"""product bundles

Revision ID: af28cc35ed6f
Revises: c4d5566ec87d
Create Date: 2021-04-15 09:30:53.107239

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'af28cc35ed6f'
down_revision = 'c4d5566ec87d'
branch_labels = None
depends_on = None

from make_post_sell.models.meta import UUIDType

from make_post_sell.models.product import DEFAULT_BUNDLE_METADATA


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('mps_product', sa.Column('is_bundle', sa.Boolean(), nullable=False, server_default="0"))
    op.add_column('mps_product', sa.Column('json_bundle_metadata', sa.UnicodeText(), nullable=False, server_default=DEFAULT_BUNDLE_METADATA))
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('mps_product', 'json_bundle_metadata')
    op.drop_column('mps_product', 'is_bundle')
    # ### end Alembic commands ###
