Closed jason-fox closed 3 years ago
CLA Assistant Lite bot All contributors have signed the CLA ✍️
Related to #216 - this will help with migration as it implements the simple quick fix suggestion made by @aarranz in https://github.com/ging/fiware-idm/issues/216#issuecomment-861312772
Allowing Keyrock to automigrate is potentially dangerous and not foolproof as it relies on the list of previously applied fixes to be up to date. It should be highly recommended that a backup is taken first.
IDM_DB_MIGRATE
defaults to false
and must be supplied from the configIDM_DB_MIGRATE
is true
, seeding will not runIDM_DB_SEED
is true it will create, migrate and seed the database as beforeIDM_DB_SEED
nor IDM_DB_MIGRATE
is true no changes will be attemptedNote: neither IDM_DB_MIGRATE
nor IDM_DB_SEED
is supported in distroless builds since they currently rely on exec()
to run sequelize which in turn requires a command line.
Thanks!
Proposed changes
Add option to run
npm run migrate_db
via a Docker ENV variableTypes of changes
What types of changes does your code introduce to the project: Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.