Skip to content

Feat: add auto migrations and notifications#1777

Open
MarceloRobert wants to merge 4 commits intokernelci:mainfrom
MarceloRobert:feat/auto-migration
Open

Feat: add auto migrations and notifications#1777
MarceloRobert wants to merge 4 commits intokernelci:mainfrom
MarceloRobert:feat/auto-migration

Conversation

@MarceloRobert
Copy link
Collaborator

@MarceloRobert MarceloRobert commented Mar 3, 2026

NOTE: this PR has a test commit at the end so that the CI can run and we can test the migration detection. This will be removed before merging.

Changes

  • Adds auto-migration running when starting the backend
  • Adds notifications for when there are new migrations on staging and production deployments
    Staging compares the current commit with the previous one, while production compares the current tag with the previous release tag

Notification will be like:

New Django migrations detected in this staging deployment:
backend/kernelCI_app/migrations/0017_treelisting_new_field.py

or

No new Django migrations detected in production deployment of release/20260304.0

Closes #1764

@MarceloRobert MarceloRobert self-assigned this Mar 3, 2026
@MarceloRobert MarceloRobert marked this pull request as ready for review March 4, 2026 16:19
Notifies on discord when staging has a new migration
Notifies on discord about new/no migration for the production deployment
@MarceloRobert MarceloRobert changed the title Feat: block deploy if it has migrations Feat: add auto migrations and notifications Mar 4, 2026
@MarceloRobert MarceloRobert added the CI/CD Most or all of the changes are about automated tests / Github's CI label Mar 4, 2026
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Automate migration script with manual-approval pipeline

1 participant