Skip to content

feat: add env var for db migrations#1813

Open
MarceloRobert wants to merge 1 commit intokernelci:mainfrom
MarceloRobert:feat/remove-auto-migration
Open

feat: add env var for db migrations#1813
MarceloRobert wants to merge 1 commit intokernelci:mainfrom
MarceloRobert:feat/remove-auto-migration

Conversation

@MarceloRobert
Copy link
Collaborator

@MarceloRobert MarceloRobert commented Mar 18, 2026

Removes the automatic migrations in favor of a more granular environment variable to allow migrations; that variable defaults to false so auto migrations are essentially disabled until set

How to test

Change the models with something, set the new variable to false (or just don't set it) and start the backend through docker (docker compose up backend --build); you'll see that the migrations will not be applied. Set the variable to true and restart the backend, then the migrations will be applied.

Closes #1818

@MarceloRobert MarceloRobert self-assigned this Mar 18, 2026
@MarceloRobert MarceloRobert added Database Issue that alters only configs of a database itself CI/CD Most or all of the changes are about automated tests / Github's CI labels Mar 18, 2026
Removes the automatic migrations in favor of a more granular environment variable to allow migrations;
that variable defaults to false so auto migrations are essentially disabled until set to true.
@MarceloRobert MarceloRobert force-pushed the feat/remove-auto-migration branch from 4434ffb to d6d30d7 Compare March 23, 2026 18:14
@MarceloRobert MarceloRobert marked this pull request as ready for review March 23, 2026 18:14
Copy link
Contributor

@alanpeixinho alanpeixinho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI/CD Most or all of the changes are about automated tests / Github's CI Database Issue that alters only configs of a database itself

Projects

None yet

Development

Successfully merging this pull request may close these issues.

allow migrations through env var

2 participants