You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
nairdo edited this page Feb 21, 2013
·
10 revisions
When your code is ready to check in and you're ready to include it in the database as well, here's a checklist to review and use.
Create the new migration class
Run the Dev Tools\Sql\CodeGen_PagesBlocksAttributesMigration.sql script. It will output stuff you'll want to use in your next step.
Run AddMigration [YOUR_MIGRATION_NAME]
Edit this skeleton migration and paste in the stuff from the MigrationUp output into your migration's Up() method and then the MigrationDown output into the Down() method.
REVIEW each item you just pasted. Not all of them are things you should include in your migration.
Manually add any other data items that were not already accounted for by the SQL script including:
EntityTypes
NoteTypes
Test your new migration class
Replace your db name with a new database name into your RockContext connection string in your web.connectionStrings.config file.
Run Update-Database to see if it worked
Verify everything by running Rock (F5) and checking every detail of your stuff.
If it's not good return to step 3 in the previous section; otherwise proceed to Commit/Push/Deploy
Commit/Push/Deploy
If everything looks good, you can commit your changes, merge (as needed) and push up to origin.