Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore:Add Alembic Commands to Makefile #4083

Merged
merged 1 commit into from
Oct 10, 2024

Conversation

edwinjosechittilappilly
Copy link
Collaborator

This PR introduces a set of Makefile targets to streamline database migration management using Alembic within our project. The following commands have been added:

  • alembic-revision: Generates a new migration script with an autogenerated schema change. Usage: make alembic-revision message="Your message here".
  • alembic-upgrade: Upgrades the database to the latest version. Usage: make alembic-upgrade.
  • alembic-downgrade: Downgrades the database by one version. Usage: make alembic-downgrade.
  • alembic-current: Displays the current migration version applied to the database. Usage: make alembic-current.
  • alembic-history: Shows the history of all migrations. Usage: make alembic-history.
  • alembic-check: Checks the migration status. Usage: make alembic-check.
  • alembic-stamp: Stamps the database with a specific revision without running any migrations. Usage: make alembic-stamp revision="revision_id".

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. enhancement New feature or request labels Oct 9, 2024
Copy link
Contributor

@ogabrielluiz ogabrielluiz left a comment

Choose a reason for hiding this comment

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

This looks good but there's a catch. #3654 changes some of the behaviour around alembic so I'd say we merge this after it

Copy link
Collaborator

@jordanrfrazier jordanrfrazier left a comment

Choose a reason for hiding this comment

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

nice

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Oct 9, 2024
added make commands related to alembic
@ogabrielluiz ogabrielluiz force-pushed the chore-update-makefile-add-alembic branch from e3e16d8 to 34911ba Compare October 10, 2024 12:06
@edwinjosechittilappilly edwinjosechittilappilly merged commit 6aa34da into main Oct 10, 2024
8 checks passed
@edwinjosechittilappilly edwinjosechittilappilly deleted the chore-update-makefile-add-alembic branch October 10, 2024 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants