Adding the migration file
This commit is contained in:
parent
885c2ad4f2
commit
0e60155a6f
@ -0,0 +1,36 @@
|
||||
"""Subtitle plugin initial migration
|
||||
|
||||
Revision ID: afd3d1da5e29
|
||||
Revises: 228916769bd2
|
||||
Create Date: 2016-06-03 11:48:03.369079
|
||||
|
||||
"""
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = 'afd3d1da5e29'
|
||||
down_revision = '228916769bd2'
|
||||
branch_labels = ('subtitles_plugin',)
|
||||
depends_on = None
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
from mediagoblin.db.extratypes import PathTupleWithSlashes
|
||||
|
||||
def upgrade():
|
||||
### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_table('core__subtitle_files',
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
sa.Column('media_entry', sa.Integer(), nullable=False),
|
||||
sa.Column('name', sa.Unicode(), nullable=False),
|
||||
sa.Column('filepath', PathTupleWithSlashes(), nullable=True),
|
||||
sa.Column('created', sa.DateTime(), nullable=False),
|
||||
sa.ForeignKeyConstraint(['media_entry'], [u'core__media_entries.id'], ),
|
||||
sa.PrimaryKeyConstraint('id')
|
||||
)
|
||||
### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_table('core__subtitle_files')
|
||||
### end Alembic commands ###
|
Loading…
x
Reference in New Issue
Block a user