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
MSSQL Server: exclude microsoft tools procedures/functions from empty schema detection #1095
Labels
Milestone
Comments
Yes, that makes sense. This could also be used for clean by explicitly excluding those. |
Would you like to contribute a PR for this? |
Yes, I should be able to find some time for this. |
Perfect! Looking forward to it! |
axelfontaine
pushed a commit
to flyway/flywaydb.org
that referenced
this issue
Feb 13, 2017
axelfontaine
pushed a commit
to flyway/flywaydb.org
that referenced
this issue
Feb 13, 2017
dohrayme
pushed a commit
to dohrayme/flyway
that referenced
this issue
Feb 3, 2020
…nctions from empty schema detection
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
SQL Server Management Studio automatically creates some procedures and function (eg. sp_alterdiagram, sp_renamediagram, fn_diagramobjects, etc.) for dealing with database diagrams.
Those objects are showing up in the INFORMATION_SCHEMA.ROUTINES view, which in turn will cause the schema to be considered non empty by Flyway. Strictly speaking, they are indeed user-defined objects, but their handling should be (in my opinion) kept outside of the versioning system.
SQL Server Studio will actually list those procedures and functions as "System" objects, relying on the "microsoft_database_tools_support" extended property in addition to the "is_ms_shipped" object field (see: http://stackoverflow.com/questions/1976248/how-do-i-list-all-non-system-stored-procedures ).
I propose to implement the same kind of check in the doEmpty() of the SQLServerSchema class.
The text was updated successfully, but these errors were encountered: