-
I'm kind of new to SQL migration and I really like this package !! I was wondering how best to run migration on my prod server. I'm using SQLite3 so I used the Go API as suggested in #670 and I have a MigrateUp() and MigrateDown() function. But I was wondering if this was safe to run the MigartionUp() every time ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
For SQLite, probably. e.g. assuming you only have one server Also if you need to rollback migrations (assuming doing so is compatible with your application) or a migration fails, you'll need to use the CLI. For failed migrations, you'll need to fix the issue and force the dirty migration to the previous version. |
Beta Was this translation helpful? Give feedback.
For SQLite, probably. e.g. assuming you only have one server
There might be issues if you start multiple instances of your application since the sqlite3 db driver doesn't support distributed locks
Also if you need to rollback migrations (assuming doing so is compatible with your application) or a migration fails, you'll need to use the CLI. For failed migrations, you'll need to fix the issue and force the dirty migration to the previous version.