Switch postgres to a non-transactional DDL to allow us to use peewee to modify data in migrations: enterprise customers are running postgres migrations offline already. Move the image backfill script back to a migration since it will now work. Unify the interface to sending a DB URI to env.py for the migration script.

This commit is contained in:
Jake Moshenko 2014-11-18 14:07:33 -05:00
parent 3815e9a293
commit 17fc72d262
6 changed files with 21 additions and 45 deletions

View file

@ -16,9 +16,7 @@ from util.uncompressedsize import backfill_sizes_from_data
def upgrade(tables):
# Note: Doing non-alembic operations inside alembic can cause a deadlock. This call has been
# moved to runmigration.sh.
pass
backfill_sizes_from_data()
def downgrade(tables):
pass

View file

@ -1,14 +1,14 @@
"""Translate the queue names to reference namespace by id, remove the namespace column.
Revision ID: 2430f55c41d5
Revises: 9a1087b007d
Revises: 313d297811c4
Create Date: 2014-09-30 17:31:33.308490
"""
# revision identifiers, used by Alembic.
revision = '2fb36d4be80d'
down_revision = '2430f55c41d5'
down_revision = '313d297811c4'
from alembic import op
import sqlalchemy as sa