AAI-119 set up migrations for aai-backend database#35
Merged
Conversation
Contributor
|
Ran 🚀 Starting temporary Postgres container...
> docker run --rm -d --name temp_alembic_db -e POSTGRES_USER=testuser -e POSTGRES_PASSWORD=testpass -p 5433:5432 postgres:17
cb158ede614f9d26c93c0e56c1d456e8249dfc8a3c7d09464a4cdbc18abe9d52
⏳ Waiting for database to be ready...
🧱 Applying existing Alembic migrations...
> alembic upgrade head
INFO [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.
INFO [alembic.runtime.migration] Running upgrade -> 101f45395233, add_group_membership
🔍 Running 'alembic check'...
> alembic check
INFO [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.
No new upgrade operations detected.
🧹 Cleaning up: stopping container...
temp_alembic_dbHad to restart my docker on mac first ;) |
amandazhuyilan
approved these changes
Jul 2, 2025
amandazhuyilan
left a comment
Contributor
There was a problem hiding this comment.
Looks good to me - thanks for making the change
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
AAI-119: set up ways to generate migrations (using a local postgres instance) and ensure we can run them against the deployed service.
Changes
generate_migrations.pyscript to generate migrations against a postgres instanceChecklist
How to Test Manually (if necessary)
Run
uv run python generate_migrations.py --checkto check that alembic is happy with the state of the migrations.