-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scaffolding synapse fails when attempting to enumerate triggers #30998
Comments
I can fix this today for EF Core Power Tools, if you are interested? |
Fixed for EF Core 7 in latest daily build of EF Core Power Tools, and CLI version rc.2 |
@ErikEJ That is probably a good move in general but we're not using power tools so I'm still working on fixing it in the ef core. I will be submitting a PR shortly. |
PR here |
New PR here (tageting main as requested) |
PR approved and tests have passed. I don't have permissions to merge it. |
Reopening to consider servicing. |
Synapse does not support triggers. Attempting to read fro mthe table sys.triggers via ssms results in the error:
Catalog view 'triggers' is not supported in this version.
Starting with efcore version 7.0.0, the scaffold process attempts to enumerate triggers, and fails with the same error message, with the stack trace below. The command requesting the scaffold is also below.The file
src/EFCore.SqlServer/Scaffolding/Internal/SqlServerDatabaseModelFactory.cs
, which is responsible for enumerating all db objects during scaffolding, has other code that specifically behaves differently when run on synapse (by engine edition), and many of them have been added since version 7 but as of 5/25, triggers are still not filtered by engine edition. Therefore, I request a change, that triggers not be enumerated when scaffolding synapse. Furthermore, since we are not able to support efcore 8.x at this time, I request a patched 7.0.x release be published with this fix.I have tested a simple code change does allow the scaffold to complete and am in the process of validating the output. I intend to submit a pull request in the near future for this issue against 7.0.x
EF Core version: 7.0.4 and 8.0.23-preview
Database provider: Microsoft.EntityFrameworkCore.SqlServer
Target framework: .NET 7.0
Operating system: 11
IDE: N/A (dotnet cli)
The text was updated successfully, but these errors were encountered: