Do you save each script as you go?
Updated by Brady Stroud [SSW] 1 year ago. See history
Modern Frameworks (EF)
Every change you do to the schema must be either saved in code or scripted out. We recommend using Migrations feature of Entity Framework. It allows you to keep track of all the changes in the similar fashion as SQL Deploy.

Figure: Example - SSW Rewards EF Migrations table
Watch video: How to Use Code First with Entity Framework - Brendan Richards to learn more.
Legacy
Keep the scripts in a separate directory, this is often named SQLScripts
. This folder should only contain .sql files.
- When you have an error you can see exactly which script introduced it
- You don't have to use a compare tool like Red-Gate SQL Compare at the end of your development cycle
- Your application can automatically make schema changes
- The application can have a "Create" database button when installed for the first time
- The application can have an "Upgrade" button and work out itself if this new version needs scripts to be run
- The application can tell if it is an old version (as a newer version may have upgraded the schema), so you only use the latest clients
- The application can have a "Reconcile" feature that compares the current schema to what it should be
File naming convention:
The script file naming convention should be as follows:
XXXXX_ObjectType_ObjectName_ColumnName_Description_SchemaMasterInitials.sql
Example:
00089_Table_OrderStatus_Status_ChangeFromBitToChar_AC.sql

Figure: A list of change SQL scripts, each file name is in the correct format
Need help?
SSW Consulting has over 30 years of experience developing awesome software solutions.