ssdt build does support 'CREATE OR ALTER'
'CREATE OR ALTER' in StoredProcedure .sql files in any Database project show errors in Visual Studio 2015 SSDT
Build database, schema compare.
Upvotes: 23<=-=Aug 1 2017 1:08PM=-=>
Would be great to get this added.<=-=Nov 6 2017 1:42AM=-=>
This is supported for “non build” scripts, not sure the use case for having for “build” files<=-=Nov 7 2017 7:49PM=-=>
The scenario for supporting the CREATE OR ALTER in a build .sql for a stored procedure, is as follows:
Since the [Test, modify, fail, modify Stored Proc, modify Test -> pass] cycle is very labour intensive currently in the VS DB project with the DB SQL Test feature, I have been experimenting with how to make writing the SQL for the test in a quicker manner.
I have written a SQL file that has [Arrange, Act, Assert] set of SQL statements, and after finished developing the final SQL ‘Assert’ statements they are then added to the DB Test file type’s formal Assertions.
The fact that running the Build of a DB and then the Tests, and finding where it error’d in the ‘hidden’ logs, during development is not as convenient as the:
ctrl-shift-E to run SQL when editing a Test SQL file in conjunction with coding a Stored Proc SQL file, so if I put CREATE OR ALTER then ctrl-shift-E and connect the StoredProc SQL file to my test DB, which is much quicker.
Is there anyway for the VS DB project type or DB Test extension to be open sourced?
I’d be interested in contributing to features and modifications.