Source Drift is when the version of the database scripts retrieved from source control doesn't match the version of the database.
The VCS you use has put the scripts on disk that are one version, and the database says it's a different version.
The "database" version is kept in a database-level extended property.
- Code: Select all
SELECT value FROM fn_listextendedproperty('SQLSourceControl Database Revision', NULL,NULL,NULL,NULL,NULL,NULL)
A few different things could have caused this, like restoring a previous version of the database or reverting some change in the source-controlled version.
You should have the latest version of the database and the latest version of the scripts. You can make sure you have not restored an older version of the database and/or going into "SQL Source Control" and doing a "get latest" operation. I am assuming you are comparing with "source control" as the source.