"""empty message

Revision ID: 0030 add members model
Revises: 0029 add marketings model
Create Date: 2019-08-10 01:36:21.513612

"""

# revision identifiers, used by Alembic.
revision = '0030 add members model'
down_revision = '0029 add marketings model'

from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql

def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('members',
    sa.Column('id', postgresql.UUID(as_uuid=True), nullable=False),
    sa.Column('old_id', sa.Integer(), nullable=True),
    sa.Column('name', sa.String(), nullable=True),
    sa.Column('email', sa.String(), nullable=True),
    sa.Column('active', sa.Boolean(), nullable=True),
    sa.Column('created_at', sa.DateTime(), nullable=True),
    sa.Column('marketing_id', postgresql.UUID(as_uuid=True), nullable=False),
    sa.Column('old_marketing_id', sa.Integer(), nullable=True),
    sa.Column('is_course_member', sa.Boolean(), nullable=True),
    sa.Column('last_updated', sa.DateTime(), nullable=True),
    sa.ForeignKeyConstraint(['marketing_id'], ['marketings.id'], ),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('email')
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('members')
    # ### end Alembic commands ###
