3 Revision ID: 9fc23495713b
5 Create Date: 2018-07-04 00:03:20.123285
9 import sqlalchemy as sa
12 # revision identifiers, used by Alembic.
13 revision = '9fc23495713b'
14 down_revision = 'de004661c5e1'
17 from sqlalchemy.dialects.postgresql import ENUM
19 type_enum = ENUM('MOD', 'GAME', 'TXP', name='packagetype', create_type=False)
22 type_enum.create(op.get_bind(), checkfirst=True)
24 # ### commands auto generated by Alembic - please adjust! ###
25 op.drop_table('krock_forum_topic')
26 op.create_table('forum_topic',
27 sa.Column('topic_id', sa.Integer(), autoincrement=False, nullable=False),
28 sa.Column('author_id', sa.Integer(), nullable=False),
29 sa.Column('type', type_enum, nullable=True),
30 sa.Column('title', sa.String(length=200), nullable=False),
31 sa.Column('name', sa.String(length=30), nullable=True),
32 sa.Column('link', sa.String(length=200), nullable=True),
33 sa.Column('posts', sa.Integer(), nullable=False),
34 sa.Column('views', sa.Integer(), nullable=False),
35 sa.Column('created_at', sa.DateTime(), nullable=False),
36 sa.ForeignKeyConstraint(['author_id'], ['user.id'], ),
37 sa.PrimaryKeyConstraint('topic_id')
39 # ### end Alembic commands ###
43 # ### commands auto generated by Alembic - please adjust! ###
44 op.drop_table('forum_topic')
45 op.create_table('krock_forum_topic',
46 sa.Column('topic_id', sa.Integer(), autoincrement=False, nullable=False),
47 sa.Column('author_id', sa.Integer(), nullable=False),
48 sa.Column('ttype', sa.Integer(), nullable=False),
49 sa.Column('title', sa.String(length=200), nullable=False),
50 sa.Column('name', sa.String(length=30), nullable=True),
51 sa.Column('link', sa.String(length=50), nullable=True),
52 sa.ForeignKeyConstraint(['author_id'], ['user.id'], ),
53 sa.PrimaryKeyConstraint('topic_id')
55 # ### end Alembic commands ###