You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Providers/FreeSql.Provider.Xugu/XuguDbFirst.cs
+27-10Lines changed: 27 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -442,14 +442,15 @@ from all_INDEXES a
442
442
{
443
443
sql=$@"
444
444
select
445
-
schema_name || '.' || b.table_name as table_id,
446
-
cons_name as FKId,
447
-
cons_type,
448
-
define
445
+
c.schema_name || '.' || b.table_name as table_id,
446
+
a.cons_name as FKId,
447
+
a.cons_type,
448
+
a.define,
449
+
(select c2.schema_name || '.' || b2.table_name from all_tables as b2 left join all_SCHEMAS as c2 on b2.SCHEMA_ID=c2.SCHEMA_ID where b2.TABLE_id=b.table_id) as ref_table_id
449
450
from all_constraints as a
450
451
left join all_tables as b on a.Table_ID=b.Table_ID
451
452
left Join all_SCHEMAS AS c on b.SCHEMA_ID=c.SCHEMA_ID
452
-
where IS_SYS=false AND {loc8.ToString().Replace("a.table_name","schema_name || '.' || b.table_name")}
453
+
where IS_SYS=false AND a.cons_type='F' AND {loc8.ToString().Replace("a.table_name","schema_name || '.' || b.table_name")}
0 commit comments