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
I really like this migration library (and I've tried several). My only complaint was getting started. I thought it might help others to share the approach I took.
I used a x.xx database versioning approach, but took the extra step to "minify" the script before including it in the migration. This allowed simple formatting and comment changes to be made (after release) without causing checksum errors.
Each migration step is a variable (with all steps of a major version defined inside a variable group for easy code folding).
I wanted to show the current database version with a before and after version if migrations were applied. Something like this:
DB Version: 2.01 (migrated from 1.03 to 2.01)
But I didn't want to perform an Info() call twice just to get the last version each time (it returns all migrations from the database).
I also wanted to provide a detailed error message if a migration failed. I do this with the very convenient info channel feature.
I really like this migration library (and I've tried several). My only complaint was getting started. I thought it might help others to share the approach I took.
I used a x.xx database versioning approach, but took the extra step to "minify" the script before including it in the migration. This allowed simple formatting and comment changes to be made (after release) without causing checksum errors.
Each migration step is a variable (with all steps of a major version defined inside a variable group for easy code folding).
I wanted to show the current database version with a before and after version if migrations were applied. Something like this:
But I didn't want to perform an
Info()
call twice just to get the last version each time (it returns all migrations from the database).I also wanted to provide a detailed error message if a migration failed. I do this with the very convenient info channel feature.
Here is the what I ended up with:
https://gist.github.com/dougwinsby/48db699dadaee6f9d8e80ea692bb4c79
Hope it helps someone.
The text was updated successfully, but these errors were encountered: