Introduction of Partner Model, adding code to Tenant model

This commit is contained in:
Josako
2025-04-03 14:07:23 +02:00
parent 1762b930bc
commit 9ad7c1aee9
93 changed files with 823 additions and 22 deletions

View File

@@ -0,0 +1,34 @@
"""Add code to Tenant
Revision ID: cab899dbb213
Revises: 98adf66ce189
Create Date: 2025-04-02 16:08:06.597183
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'cab899dbb213'
down_revision = '98adf66ce189'
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('code', sa.String(length=50), nullable=True))
batch_op.create_unique_constraint(None, ['code'])
# ### 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_='unique')
batch_op.drop_column('code')
# ### end Alembic commands ###