Skip to content

Commit

Permalink
Fixes scaffolding on Synapse (triggers) (#31011)
Browse files Browse the repository at this point in the history
Fixes #30998
  • Loading branch information
memory-thrasher authored Jun 1, 2023
1 parent dbc8efb commit e5b7c93
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,11 @@ FROM [sys].[views] AS [v]
}

GetForeignKeys(connection, tables, tableFilterSql);
GetTriggers(connection, tables, tableFilterSql);

if (SupportsTriggers())
{
GetTriggers(connection, tables, tableFilterSql);
}

foreach (var table in tables)
{
Expand Down Expand Up @@ -1372,6 +1376,9 @@ private bool SupportsIndexes()
private bool SupportsViews()
=> _engineEdition != 1000;

private bool SupportsTriggers()
=> _engineEdition is not 6 and not 11 and not 1000;

private static string DisplayName(string? schema, string name)
=> (!string.IsNullOrEmpty(schema) ? schema + "." : "") + name;

Expand Down

0 comments on commit e5b7c93

Please sign in to comment.