Skip to content

Commit

Permalink
Merge pull request #392 from okineadev-forks/add-bash-script
Browse files Browse the repository at this point in the history
feat: create migration script
  • Loading branch information
djeck1432 authored Dec 19, 2024
2 parents 5055348 + 9ea12a6 commit 6d8f559
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions scripts/migrate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

docker-compose -f docker-compose.back.yaml up --build

echo "Installing Poetry globally..."
curl -sSL https://install.python-poetry.org | python3 -

echo "Installing all dependencies for \"data_handler\" with Poetry..."
poetry install

echo "Activating ..."
poetry shell

echo "Applying latest existing migrations..."
poetry run alembic -c web_app/alembic.ini upgrade head

echo "Generating new migration..."
poetry run alembic -c web_app/alembic.ini revision --autogenerate -m "Migration"

0 comments on commit 6d8f559

Please sign in to comment.