pekspro / EF-Migrations-Script-Generator-Task

24 stars 7 forks source link

Deploying Stored Procedures via a script #29

Closed doug-saganworks closed 3 years ago

doug-saganworks commented 3 years ago

When deploying stored procedures via a SQL script, the Script Generator puts the SQL used to create the Stored Procedure inside of a SQL IF BEGIN/END block. The issue with this is that this causes an error in SQL server in that you can't create/update a stored procedure inside of a IF block.

pekspro commented 3 years ago

This repository is just a wrapper for dotnet ef that is generating the migration script. So, I think it is better if you comment this on: https://github.com/dotnet/efcore. There are some issues already that might be related:

https://github.com/dotnet/efcore/issues/7681 https://github.com/dotnet/efcore/issues/22616 https://github.com/dotnet/efcore/issues/22613