def downgrade():
### commands auto generated by Alembic - please adjust! ###
op.create_table('pages',
sa.Column('id', sa.INTEGER(), nullable=False),
sa.Column('ts', postgresql.TIMESTAMP(), autoincrement=False, nullable=True),
sa.Column('created_by_id', sa.INTEGER(), autoincrement=False, nullable=True),
sa.Column('modified', postgresql.TIMESTAMP(), autoincrement=False, nullable=True),
sa.Column('modified_by_id', sa.INTEGER(), autoincrement=False, nullable=True),
sa.Column('slug', sa.VARCHAR(length=255), autoincrement=False, nullable=False),
sa.Column('title', sa.VARCHAR(length=255), autoincrement=False, nullable=False),
sa.Column('content', sa.TEXT(), autoincrement=False, nullable=False),
sa.ForeignKeyConstraint(['created_by_id'], [u'users.id'], name=u'pages_created_by_id_fkey'),
sa.ForeignKeyConstraint(['modified_by_id'], [u'users.id'], name=u'pages_modified_by_id_fkey'),
sa.PrimaryKeyConstraint('id', name=u'pages_pkey')
)
op.add_column('menus_items', sa.Column('is_public', sa.BOOLEAN(), autoincrement=False, nullable=True))
op.add_column('menus_items', sa.Column('roles', sa.VARCHAR(length=255), autoincrement=False, nullable=True))
op.add_column('menus_items', sa.Column('ts', postgresql.TIMESTAMP(), autoincrement=False, nullable=True))
op.add_column('menus_items', sa.Column('page_id', sa.INTEGER(), autoincrement=False, nullable=True))
op.add_column('menus_items', sa.Column('is_group_label', sa.BOOLEAN(), autoincrement=False, nullable=True))
op.add_column('menus_items', sa.Column('created_by_id', sa.INTEGER(), autoincrement=False, nullable=True))
op.create_foreign_key(u'menus_items_page_id_fkey', 'menus_items', 'pages', ['page_id'], ['id'])
op.create_foreign_key(u'menus_items_created_by_id_fkey', 'menus_items', 'users', ['created_by_id'], ['id'])
op.add_column('menus', sa.Column('ts', postgresql.TIMESTAMP(), autoincrement=False, nullable=True))
op.add_column('menus', sa.Column('created_by_id', sa.INTEGER(), autoincrement=False, nullable=True))
op.create_foreign_key(u'menus_created_by_id_fkey', 'menus', 'users', ['created_by_id'], ['id'])
op.drop_table('menuitem_roles')
### end Alembic commands ###
241a7b04a9ff_add_menurole_rm_pages.py 文件源码
python
阅读 32
收藏 0
点赞 0
评论 0
评论列表
文章目录