Adding the migration file
authorsaksham1115 <saksham115@gmail.com>
Fri, 8 Jul 2016 10:55:56 +0000 (10:55 +0000)
committersaksham1115 <saksham115@gmail.com>
Tue, 19 Jul 2016 17:29:09 +0000 (17:29 +0000)
mediagoblin/db/migrations/versions/afd3d1da5e29_subtitle_plugin_initial_migration.py [new file with mode: 0644]

diff --git a/mediagoblin/db/migrations/versions/afd3d1da5e29_subtitle_plugin_initial_migration.py b/mediagoblin/db/migrations/versions/afd3d1da5e29_subtitle_plugin_initial_migration.py
new file mode 100644 (file)
index 0000000..565d486
--- /dev/null
@@ -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 ###