Merge remote-tracking branch 'gsoc2016/Subtitle-1'
[mediagoblin.git] / mediagoblin / db / migrations / versions / afd3d1da5e29_subtitle_plugin_initial_migration.py
1 """Subtitle plugin initial migration
2
3 Revision ID: afd3d1da5e29
4 Revises: 228916769bd2
5 Create Date: 2016-06-03 11:48:03.369079
6
7 """
8
9 # revision identifiers, used by Alembic.
10 revision = 'afd3d1da5e29'
11 down_revision = '228916769bd2'
12 branch_labels = ('subtitles_plugin',)
13 depends_on = None
14
15 from alembic import op
16 import sqlalchemy as sa
17 from mediagoblin.db.extratypes import PathTupleWithSlashes
18
19 def upgrade():
20 ### commands auto generated by Alembic - please adjust! ###
21 op.create_table('core__subtitle_files',
22 sa.Column('id', sa.Integer(), nullable=False),
23 sa.Column('media_entry', sa.Integer(), nullable=False),
24 sa.Column('name', sa.Unicode(), nullable=False),
25 sa.Column('filepath', PathTupleWithSlashes(), nullable=True),
26 sa.Column('created', sa.DateTime(), nullable=False),
27 sa.ForeignKeyConstraint(['media_entry'], [u'core__media_entries.id'], ),
28 sa.PrimaryKeyConstraint('id')
29 )
30 ### end Alembic commands ###
31
32
33 def downgrade():
34 ### commands auto generated by Alembic - please adjust! ###
35 op.drop_table('core__subtitle_files')
36 ### end Alembic commands ###