Titan/webapp/alembic/versions/1d2c2dc41e86_removed_guild_members_table.py

41 lines
1.5 KiB
Python
Raw Permalink Normal View History

"""Removed guild members table
Revision ID: 1d2c2dc41e86
Revises: 52271b243ba2
Create Date: 2018-07-17 23:45:18.803232
"""
# revision identifiers, used by Alembic.
revision = '1d2c2dc41e86'
down_revision = '52271b243ba2'
branch_labels = None
depends_on = None
from alembic import op
import sqlalchemy as sa
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('guild_members')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('guild_members',
sa.Column('id', sa.INTEGER(), nullable=False),
sa.Column('guild_id', sa.BIGINT(), autoincrement=False, nullable=False),
sa.Column('user_id', sa.BIGINT(), autoincrement=False, nullable=False),
sa.Column('username', sa.VARCHAR(length=255), autoincrement=False, nullable=False),
sa.Column('discriminator', sa.INTEGER(), autoincrement=False, nullable=False),
sa.Column('nickname', sa.VARCHAR(length=255), autoincrement=False, nullable=True),
sa.Column('avatar', sa.VARCHAR(length=255), autoincrement=False, nullable=True),
sa.Column('active', sa.BOOLEAN(), server_default=sa.text('true'), autoincrement=False, nullable=False),
sa.Column('banned', sa.BOOLEAN(), server_default=sa.text('false'), autoincrement=False, nullable=False),
sa.Column('roles', sa.TEXT(), autoincrement=False, nullable=False),
sa.PrimaryKeyConstraint('id', name='idx_25210_primary')
)
# ### end Alembic commands ###