Browse Source

Point pluggy migration to hidden posts/topic migration

Alec Nikolas Reiter 7 years ago
parent
commit
bc9d73ed00
1 changed files with 25 additions and 22 deletions
  1. 25 22
      migrations/7c3fcf8a3335_add_plugin_tables.py

+ 25 - 22
migrations/7c3fcf8a3335_add_plugin_tables.py

@@ -5,39 +5,42 @@ Revises:
 Create Date: 2017-08-12 12:41:04.725309
 
 """
-from alembic import op
 import sqlalchemy as sa
-
+from alembic import op
 
 # revision identifiers, used by Alembic.
 revision = '7c3fcf8a3335'
-down_revision = None
-branch_labels = ('default',)
+down_revision = 'd0ffadc3ea48'
+branch_labels = ()
 depends_on = None
 
 
 def upgrade():
     # ### commands auto generated by Alembic - please adjust! ###
-    op.create_table('plugin_registry',
-    sa.Column('id', sa.Integer(), nullable=False),
-    sa.Column('name', sa.Unicode(length=255), nullable=False),
-    sa.Column('enabled', sa.Boolean(), nullable=True),
-    sa.PrimaryKeyConstraint('id'),
-    sa.UniqueConstraint('name')
+    op.create_table(
+        'plugin_registry',
+        sa.Column('id', sa.Integer(), nullable=False),
+        sa.Column('name', sa.Unicode(length=255), nullable=False),
+        sa.Column('enabled', sa.Boolean(), nullable=True),
+        sa.PrimaryKeyConstraint('id'), sa.UniqueConstraint('name')
     )
 
-    op.create_table('plugin_store',
-    sa.Column('id', sa.Integer(), nullable=False),
-    sa.Column('key', sa.Unicode(length=255), nullable=False),
-    sa.Column('value', sa.PickleType(), nullable=True),
-    sa.Column('value_type', sa.Unicode(length=20), nullable=False),
-    sa.Column('extra', sa.PickleType(), nullable=False),
-    sa.Column('plugin_id', sa.Integer(), nullable=True),
-    sa.Column('name', sa.Unicode(length=255), nullable=False),
-    sa.Column('description', sa.Text(), nullable=False),
-    sa.ForeignKeyConstraint(['plugin_id'], ['plugin_registry.id'], ),
-    sa.PrimaryKeyConstraint('id'),
-    sa.UniqueConstraint('key', 'plugin_id', name='plugin_kv_uniq')
+    op.create_table(
+        'plugin_store',
+        sa.Column('id', sa.Integer(), nullable=False),
+        sa.Column('key', sa.Unicode(length=255), nullable=False),
+        sa.Column('value', sa.PickleType(), nullable=True),
+        sa.Column('value_type', sa.Unicode(length=20), nullable=False),
+        sa.Column('extra', sa.PickleType(), nullable=False),
+        sa.Column('plugin_id', sa.Integer(), nullable=True),
+        sa.Column('name', sa.Unicode(length=255), nullable=False),
+        sa.Column('description', sa.Text(), nullable=False),
+        sa.ForeignKeyConstraint(
+            ['plugin_id'],
+            ['plugin_registry.id'],
+        ),
+        sa.PrimaryKeyConstraint('id'),
+        sa.UniqueConstraint('key', 'plugin_id', name='plugin_kv_uniq')
     )
     # ### end Alembic commands ###