Comments
2 comments
-
I did some more investigations and.... apparently if the empty DB has any user more than this list it's considered not empty... in my case I had a local user and after deleting it everything worked fine; is there any setting in the project to control this behavior?dboguestINFORMATION_SCHEMAsys
-
Any user objects in a database will cause SQL Change Automation to consider it not empty.
If you want to override this behavior and still deploy the Baseline you have 2 options:
1- User a filter file that excludes the additional object or objects (in this case this would be the local user).
Please note that unlike with SQL Source Control projects you will not be able to apply this filter file only when deploying: you need to set this in the .sqlproj file
https://documentation.red-gate.com/sca/developing-databases/concepts/filtering
2 - Pre-create the dbo.__MigrationLog table (this is the table that keeps track of the migrations that have been applied) and leave it completely empty (you can copy the structure of this table from your development database
Add comment
Please sign in to leave a comment.
I would like to know either:
1. how is SCA determining whether a DB is empty or not?
2. is it possible to force deployment of the baseline in case the __MigrationLog table is not present?
thank you
Roberto