Skip to content

Commit

Permalink
Pin alembic version to 'alembic==1.9.4' (#354)
Browse files Browse the repository at this point in the history
### Feature or Bugfix
- Bugfix

### Detail
- pinned alembic version when installing with pip. Alembic is currently
installed directly in CodeBuild because it is only used in the migration
CodeBuild environments. In this PR the version of alembic is pinned in
the makefile that is used in these stages.

### Relates
- #353 

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.
  • Loading branch information
dlpzx committed Mar 9, 2023
1 parent 8dffce2 commit d32ad6a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ assume-role:
rm .assume_role_json

drop-tables: upgrade-pip install-backend
pip install alembic
pip install 'alembic==1.9.4'
export PYTHONPATH=./backend && \
python backend/migrations/drop_tables.py

upgrade-db: upgrade-pip install-backend
pip install alembic
pip install 'alembic==1.9.4'
export PYTHONPATH=./backend && \
alembic -c backend/alembic.ini upgrade head

Expand Down
2 changes: 1 addition & 1 deletion deploy/stacks/dbmigration.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def __init__(
'python -m venv env',
'. env/bin/activate',
'pip install -r backend/requirements.txt',
'pip install alembic',
'pip install "alembic==1.9.4"',
'export PYTHONPATH=backend',
f'export envname={envname}',
f'alembic -c backend/alembic.ini upgrade head',
Expand Down

0 comments on commit d32ad6a

Please sign in to comment.