Skip to content

Commit

Permalink
Update Makefile
Browse files Browse the repository at this point in the history
added make commands related to alembic
  • Loading branch information
edwinjosechittilappilly authored and ogabrielluiz committed Oct 10, 2024
1 parent 2adda78 commit 34911ba
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -443,3 +443,34 @@ ifdef main
poetry config repositories.test-pypi https://test.pypi.org/legacy/
make publish_langflow_testpypi
endif


# example make alembic-revision message="Add user table"
alembic-revision: ## generate a new migration
@echo 'Generating a new Alembic revision'
cd src/backend/base/langflow/ && uv run alembic revision --autogenerate -m "$(message)"


alembic-upgrade: ## upgrade database to the latest version
@echo 'Upgrading database to the latest version'
cd src/backend/base/langflow/ && uv run alembic upgrade head

alembic-downgrade: ## downgrade database by one version
@echo 'Downgrading database by one version'
cd src/backend/base/langflow/ && uv run alembic downgrade -1

alembic-current: ## show current revision
@echo 'Showing current Alembic revision'
cd src/backend/base/langflow/ && uv run alembic current

alembic-history: ## show migration history
@echo 'Showing Alembic migration history'
cd src/backend/base/langflow/ && uv run alembic history --verbose

alembic-check: ## check migration status
@echo 'Running alembic check'
cd src/backend/base/langflow/ && uv run alembic check

alembic-stamp: ## stamp the database with a specific revision
@echo 'Stamping the database with revision $(revision)'
cd src/backend/base/langflow/ && uv run alembic stamp $(revision)

0 comments on commit 34911ba

Please sign in to comment.