Skip to content

Commit

Permalink
Fixes attempt to scaffold triggers on synapse re: issue #30998
Browse files Browse the repository at this point in the history
  • Loading branch information
memory-thrasher committed May 31, 2023
1 parent 62238db commit 22ee564
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 22ee564

Please sign in to comment.