chore:Add Alembic Commands to Makefile (#4083)
Update Makefile added make commands related to alembic
This commit is contained in:
parent
2adda780c9
commit
6aa34dac65
1 changed files with 31 additions and 0 deletions
31
Makefile
31
Makefile
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue