"""Add entitlement information to Tenant

Revision ID: 48714f1baac5
Revises: f201bfd23152
Create Date: 2024-10-03 14:49:53.922320

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '48714f1baac5'
down_revision = 'f201bfd23152'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table('license', schema=None) as batch_op:
        batch_op.add_column(sa.Column('yearly_payment', sa.Boolean(), nullable=False))

    with op.batch_alter_table('tenant', schema=None) as batch_op:
        batch_op.add_column(sa.Column('currency', sa.String(length=20), nullable=True))
        batch_op.add_column(sa.Column('usage_email', sa.String(length=255), nullable=True))

    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table('tenant', schema=None) as batch_op:
        batch_op.drop_column('usage_email')
        batch_op.drop_column('currency')

    with op.batch_alter_table('license', schema=None) as batch_op:
        batch_op.drop_column('yearly_payment')

    # ### end Alembic commands ###
