#5391 closed defect (fixed)
Migration issue with postgres on new setups
Reported by: | Jessica Tallon | Owned by: | |
---|---|---|---|
Priority: | blocker | Milestone: | 0.9.0 |
Component: | programming | Keywords: | db, migrations, alembic |
Cc: | Parent Tickets: |
Description
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 , 9 years ago
comment:2 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:3 by , 9 years ago
Milestone: | 0.8.2 → 0.9.0 |
---|
All 0.8.2 tickets are being rolled over to 0.9.0
Note:
See TracTickets
for help on using tickets.
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:
http://git.savannah.gnu.org/cgit/mediagoblin.git/tree/alembic.ini#n23
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.