mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 04:18:16 +08:00
- 修改 Oracle CodeFirst 使用 OldName 迁移自增字段时,未删除旧的触发器和序列的 bug;
This commit is contained in:
@ -79,6 +79,11 @@
|
||||
测试中文重命名id
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:FreeSql.Tests.UnitTest1.Class1.name">
|
||||
<summary>
|
||||
姓名
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:FreeSql.Tests.ExamPaper">
|
||||
<summary>
|
||||
试卷表
|
||||
|
@ -10,6 +10,7 @@ using Npgsql.LegacyPostgis;
|
||||
using System.Linq.Expressions;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace FreeSql.Tests
|
||||
{
|
||||
@ -318,10 +319,32 @@ namespace FreeSql.Tests
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class Class1
|
||||
{
|
||||
[Column(IsIdentity = true)]
|
||||
public long ID { set; get; }
|
||||
|
||||
[Column(IsIdentity = true, OldName = "stu_id_log")]
|
||||
public long stu_id { set; get; }
|
||||
/// <summary>
|
||||
/// 姓名
|
||||
/// </summary>
|
||||
public string name { set; get; }
|
||||
|
||||
public int age { set; get; }
|
||||
|
||||
public DateTime class2 { set; get; }
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Test1()
|
||||
{
|
||||
g.oracle.Aop.SyncStructureAfter += (s, e) =>
|
||||
Trace.WriteLine(e.Sql);
|
||||
|
||||
g.oracle.CodeFirst.SyncStructure<Class1>();
|
||||
|
||||
//g.sqlite.Aop.ParseExpression += parseExp;
|
||||
|
||||
|
Reference in New Issue
Block a user