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'm building a project where multiple small APIs built with AdonisJS use the same database.
I've found a scenario which raised some concerns for the long-term development:
API 1 runs migration '00_api1'
API 2 runs migration '00_api2'
API 1 tries to rollback migration '00_api1'
It fails, since AdonisJS is looking for the last migration on the table, '00_api2'
This scenario only happens on development (and rarely on staging), when sometimes there's the need for rollback to avoid creating multiple migrations before a "initial deploy".
I thought of two possible solutions:
The ability to cherry-pick migrations. However this might introduce a lot of mistakes.
Binding the migration row to the project, so a rollback looks for the last migration of the current project.
The current workaround is rolling back all the migrations down to the one on the current project, then running them all again. On a scenario with 3~5 APIs this is unpractical.
Is this a desired feature?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm building a project where multiple small APIs built with AdonisJS use the same database.
I've found a scenario which raised some concerns for the long-term development:
This scenario only happens on development (and rarely on staging), when sometimes there's the need for rollback to avoid creating multiple migrations before a "initial deploy".
I thought of two possible solutions:
The current workaround is rolling back all the migrations down to the one on the current project, then running them all again. On a scenario with 3~5 APIs this is unpractical.
Is this a desired feature?
Beta Was this translation helpful? Give feedback.
All reactions