mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-18 20:08:15 +08:00
- 修复 postgresql 12 移除 pg_attrdef.adsrc 列,导致 CodeFirst 方法失败的 bug;
- 增加 Aop.ConfigEntity 属性 ModifyIndexResult 现实 IndexAttribute 的设置;
This commit is contained in:
@ -207,7 +207,8 @@ t.typname,
|
||||
case when a.atttypmod > 0 and a.atttypmod < 32767 then a.atttypmod - 4 else a.attlen end len,
|
||||
case when t.typelem > 0 and t.typinput::varchar = 'array_in' then t2.typname else t.typname end,
|
||||
case when a.attnotnull then '0' else '1' end as is_nullable,
|
||||
e.adsrc,
|
||||
coalesce((select 1 from pg_sequences where sequencename = {0} || '_' || {1} || '_' || a.attname || '_sequence_name' limit 1),0) is_identity,
|
||||
--e.adsrc,
|
||||
a.attndims,
|
||||
d.description as comment
|
||||
from pg_class c
|
||||
@ -243,7 +244,7 @@ where ns.nspname = {0} and c.relname = {1}", tboldname ?? tbname);
|
||||
sqlType = string.Concat(sqlType),
|
||||
max_length = long.Parse(string.Concat(a[2])),
|
||||
is_nullable = string.Concat(a[4]) == "1",
|
||||
is_identity = string.Concat(a[5]).StartsWith(@"nextval('") && string.Concat(a[5]).EndsWith(@"'::regclass)"),
|
||||
is_identity = string.Concat(a[5]) == "1", //string.Concat(a[5]).StartsWith(@"nextval('") && string.Concat(a[5]).EndsWith(@"'::regclass)"),
|
||||
attndims,
|
||||
comment = string.Concat(a[7])
|
||||
};
|
||||
|
Reference in New Issue
Block a user