- 修改 Oracle CodeFirst 使用 OldName 迁移自增字段时,未删除旧的触发器和序列的 bug;

This commit is contained in:
28810
2019-07-29 18:43:59 +08:00
parent 9b80f8cd53
commit 77ae9d0024
3 changed files with 69 additions and 23 deletions

View File

@ -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;