Script status information window
Published 06 March 2017
The ReadyRoll extension for Visual Studio includes a window which displays in the upper right hand corner of the document window, whenever you open a T-SQL file for editing. Depending on whether your script has been deployed (either in part or in full), the window will update with a different status message, as outlined below.
Script status: Pending deployment
Applies to both migrations and programmable objects
For migrations: The migration has yet to be successfully deployed to the DB, or the migration ID has changed since deployment.
For programmable objects: The script has yet to be successfully deployed to the DB, or any part of the script has changed (including the migration ID, if included)
Click Deploy Project to deploy the project that the script is contained within, plus any projects that the project depends upon. The server/database that the migration(s) will be deployed to is displayed within the window.
Click Mark as Deployed if you've executed the script against the DB yourself already, and want to prevent it from being re-executed during the next deployment. This button can also be used to set the baseline within a pre-existing database.
Script status: Deployed
Applies to both migrations and programmable objects
For both migrations & programmable objects: The script has been successfully deployed to the DB by ReadyRoll itself (i.e. by clicking the Deploy Project button above or by clicking Build… Deploy Solution in Visual Studio), and has not been modified since then.
For programmable objects: A script will also be in this state if the object was imported from the database.
Script status: Marked as deployed
Applies to both migrations and programmable objects
For migrations: The Mark As Deployed button was clicked when the migration was either in the Pending deployment, Deployed but modified, or Imported but modified state.
For programmable objects: The Mark As Deployed button was clicked when the script was in the Pending deployment state.
Script status: Deployed, but modified
Applies to migrations only
For migrations: The migration file was modified, after it was successfully deployed to the database. Since modifying a migration after deployment is generally not recommended, a warning is shown both within the widget and within the build-time warnings.
If you do need to make a modification to an already-deployed migration, ensure that you (manually) execute any T-SQL statements that you add to the script. If you needed to remove or otherwise modify any part of the script, then it's a good idea to always check the ReadyRoll tool-window to verify that the script still passes verification, and that any schema or static data differences that may result from the changes are reverted.
After confirming that the target database(s) are in-sync with the migration modification, click the Mark as Deployed button to disregard the warning.
Script status: Imported
Applies to migrations only
For migrations: The migration was generated by importing from the DB using the RR tool-window, and has not been modified since then.
Script status: Imported, but modified
Applies to migrations only
For migrations: The migration was generated by importing from the DB using the RR tool-window, however since being imported, the script has been modified (see Deployed, but modified for more information)
Script status: Metadata missing
Applies to migrations only
For migrations: The metadata (i.e. the <Migration ID="x"/> xml fragment in the header) has been removed from the script, or the script was added to the project using the Solution Explorer without any metadata contained.
Click Insert Metadata to generate a migration xml fragment containing a new random unique ID, and insert it into the script header.
Script status: Offline schema model (read only)
Applies to files within the Schema-Model project folder only
For any files under Schema Model sub-folder: indicates that the file is controlled by the offline schema model feature and that manual modifications to it will have no effect.