text: """initial db migration
  
  Revision ID: 1778a33df5d2
  Revises: 
  Create Date: 2021-02-21 16:00:46.031563
  
  """
  from alembic import op
  import sqlalchemy as sa
  
  
  # revision identifiers, used by Alembic.
  revision = '1778a33df5d2'
  down_revision = None
  branch_labels = None
  depends_on = None
  
  
  def upgrade():
      # ### commands auto generated by Alembic - please adjust! ###
      op.create_table('blacklist_tokens',
      sa.Column('blacklist_id', sa.Integer(), autoincrement=True, nullable=False),
      sa.Column('token', sa.String(length=500), nullable=False),
      sa.Column('blacklisted_on', sa.DateTime(), nullable=False),
      sa.PrimaryKeyConstraint('blacklist_id'),
      sa.UniqueConstraint('token')
      )
      op.create_table('sellables',
      sa.Column('sellable_id', sa.Integer(), nullable=False),
      sa.Column('name', sa.String(length=64), nullable=True),
      sa.Column('image_path', sa.String(length=256), nullable=True),
      sa.Column('stock', sa.Integer(), nullable=True),
      sa.Column('price', sa.Float(), nullable=True),
      sa.Column('description', sa.Text(), nullable=True),
      sa.Column('category', sa.String(length=64), nullable=True),
      sa.Column('team', sa.String(length=64), nullable=True),
      sa.Column('theme', sa.Enum('pokemon', 'basketball', 'football', 'baseball', 'hockey', name='sellabletheme'), nullable=True),
      sa.Column('type', sa.String(length=64), nullable=True),
      sa.PrimaryKeyConstraint('sellable_id')
      )
      op.create_table('users',
      sa.Column('user_id', sa.Integer(), nullable=False),
      sa.Column('first_name', sa.String(length=120), nullable=True),
      sa.Column('last_name', sa.String(length=120), nullable=True),
      sa.Column('email', sa.String(length=120), nullable=True),
      sa.Column('registered_on', sa.DateTime(), nullable=False),
      sa.Column('roles', sa.ARRAY(sa.String(length=120)), nullable=True),
      sa.Column('password_hash', sa.String(length=128), nullable=True),
      sa.PrimaryKeyConstraint('user_id')
      )
      op.create_index(op.f('ix_users_email'), 'users', ['email'], unique=True)
      op.create_table('boxes',
      sa.Column('box_id', sa.Integer(), nullable=False),
      sa.ForeignKeyConstraint(['box_id'], ['sellables.sellable_id'], ),
      sa.PrimaryKeyConstraint('box_id')
      )
      op.create_table('cards',
      sa.Column('card_id', sa.Integer(), nullable=False),
      sa.Column('year', sa.Integer(), nullable=True),
      sa.ForeignKeyConstraint(['card_id'], ['sellables.sellable_id'], ),
      sa.PrimaryKeyConstraint('card_id')
      )
      op.create_table('packs',
      sa.Column('pack_id', sa.Integer(), nullable=False),
      sa.ForeignKeyConstraint(['pack_id'], ['sellables.sellable_id'], ),
      sa.PrimaryKeyConstraint('pack_id')
      )
      op.create_table('wishlists',
      sa.Column('user_id', sa.Integer(), nullable=False),
      sa.Column('sellable_id', sa.Integer(), nullable=False),
      sa.Column('date_added', sa.DateTime(), nullable=True),
      sa.ForeignKeyConstraint(['sellable_id'], ['sellables.sellable_id'], ),
      sa.ForeignKeyConstraint(['user_id'], ['users.user_id'], ),
      sa.PrimaryKeyConstraint('user_id', 'sellable_id')
      )
      # ### end Alembic commands ###
  
  
  def downgrade():
      # ### commands auto generated by Alembic - please adjust! ###
      op.drop_table('wishlists')
      op.drop_table('packs')
      op.drop_table('cards')
      op.drop_table('boxes')
      op.drop_index(op.f('ix_users_email'), table_name='users')
      op.drop_table('users')
      op.drop_table('sellables')
      op.drop_table('blacklist_tokens')
      # ### end Alembic commands ###
  