[Feature Request]: Add support for the "CREATE OR ALTER ..." statement for SQL stored procedures
- Dominant language
- C#
- Stars
- 460
- Forks
- 29
- Avg merge
- 4d 9h
- Merged PRs (30d)
- 7
Description
Describe Issue:
Please add support for the "CREATE OR ALTER ..." statement for SQL stored procedures as it has been supported since MS SQL 2016.
Steps to Reproduce:
- Create an MS SQL stored procedure with the "CREATE OR ALTER" statement.
- In Database Projects, select "Create Project from Database."
- The "CREATE OR ALTER ..." statement is replaced by "CREATE ..."
Expected Behavior:
Preserve the "CREATE OR ALTER ..." statement or add a parameter to specify the expected behavior.
Actual Behavior:
- The "CREATE OR ALTER ..." statement is replaced by "CREATE ...".
- Saving modifications leads to an error in the SQL script because the stored procedure already exists.
Software | Version
-- | --
ms-mssql.sql-database-projects-vscode | 1.5.3
MSSQL Extension | 1.33.0
VS Code | 1.102.0
OS | Windows_NT 10.0.26100
Contributor guide
Research direction
Start by reproducing the issue in Database Projects with the listed SQL Server, MSSQL extension, and VS Code versions, using “Create Project from Database” on a stored procedure containing CREATE OR ALTER. Trace where that statement is converted to CREATE; done means the statement is preserved or the requested behavior can be selected, and saving no longer fails because the procedure already exists.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, sql
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100