Opened 7 years ago
Closed 7 years ago
Last modified 7 years ago
#5391 closed defect (fixed)
Migration issue with postgres on new setups
|Reported by:||Jessica Tallon||Owned by:|
|Component:||programming||Keywords:||db, migrations, alembic|
When you setup Mediagoblin for the first time and use postgres for some reason you get an exception claiming the Graveyard table doesn't exist. I suspect it's somehow related to the switch to alembic however i'm unsure.
Steps to reproduce:
- Follow basic instructions: ./bootstrap && ./configure && make
- Setup a brand new postgres database (configure to use it in mediagoblin.ini)
- Run the ./bin/gmg dbupdate
Change History (3)
comment:1 by , 7 years ago
comment:2 by , 7 years ago
|Status:||new → closed|
comment:3 by , 7 years ago
|Milestone:||0.8.2 → 0.9.0|
All 0.8.2 tickets are being rolled over to 0.9.0
Okay. I think I've found the issue. I've had a look and it seems all the Alembic migrations get a connection to the sqlite database (which might or might not exist) regardless of what's set in mediagoblin.ini.
I tracked it down and it's just because the sqlite database is statically defined here:
I'm not sure why it sometimes works when configured to use PostgreSQL but it shouldn't, ever. For it to work, doesn't make sense at all. I'm going to try and create a fix where this option is removed and populated in code in the migration manager from the mediagoblin config.