"""Add default TenantMake to Tenant model

Revision ID: 83d4e90f87c6
Revises: f40d16a0965a
Create Date: 2025-06-09 15:42:51.503696

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '83d4e90f87c6'
down_revision = 'f40d16a0965a'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###

    with op.batch_alter_table('tenant', schema=None) as batch_op:
        batch_op.add_column(sa.Column('default_tenant_make_id', sa.Integer(), nullable=True))
        batch_op.create_foreign_key(None, 'tenant_make', ['default_tenant_make_id'], ['id'], referent_schema='public')

    # ### 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_constraint(None, type_='foreignkey')
        batch_op.drop_column('default_tenant_make_id')

    # ### end Alembic commands ###
