Postgres db doesn't migrate

ProjectId: afb8106b-a19e-46df-bab0-1649ea245aa6 everything was working fine until now. I'm using fastapi with alembic. Did some changes in models, created migrations, then ran those migrations from local cli like this:
(venv) core % railway link
> Select a project first-cause
> Select an environment staging
> Select a service core
(venv) core % railway run alembic downgrade -1
INFO [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.
INFO [alembic.runtime.migration] Running downgrade a4d9bfe6a0de -> b20c5c0da7ca, add replicate task
(venv) core % railway run alembic upgrade head
INFO [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.
INFO [alembic.runtime.migration] Running upgrade b20c5c0da7ca -> a4d9bfe6a0de, add replicate task
(venv) core % railway run alembic current
INFO [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.
a4d9bfe6a0de (head)
(venv) core % railway link
> Select a project first-cause
> Select an environment staging
> Select a service core
(venv) core % railway run alembic downgrade -1
INFO [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.
INFO [alembic.runtime.migration] Running downgrade a4d9bfe6a0de -> b20c5c0da7ca, add replicate task
(venv) core % railway run alembic upgrade head
INFO [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.
INFO [alembic.runtime.migration] Running upgrade b20c5c0da7ca -> a4d9bfe6a0de, add replicate task
(venv) core % railway run alembic current
INFO [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.
a4d9bfe6a0de (head)
looks like everything is working fine but it did not update the database in railway. In database I have this alembic version
No description
2 Replies
Percy
Percy9mo ago
Project ID: afb8106b-a19e-46df-bab0-1649ea245aa6
Medikornov
MedikornovOP9mo ago
nvm, downgraded the last migration, created PR with the same migration, just a different names/ids, used
railway run alembic upgrade head
railway run alembic upgrade head
, now it works...
Want results from more Discord servers?
Add your server