goose
goose copied to clipboard
feature: record up and down sql in db_version table
In my business, i need to down-to the last version in dir when db version is higher than dir's version.
if i want to do this. i need to get downgrade sql to execute. get it from db is the only way.
Apologies, not sure I follow. How can the db version be higher than the migrations in the directory?
Are you modifying the database goose migration table?
@mfridman thanks for your reply!
Our products are deployed on customers' machines。different customer need different verisons.
The way we run migrations is to execute a job in k8s by helm hook. when customer need to deploy a lower version. we can just use lower version image and downgrade the db version