|
|
|
@ -34,7 +34,7 @@ def upgrade() -> None:
|
|
|
|
|
# person
|
|
|
|
|
op.create_table('person_version',
|
|
|
|
|
sa.Column('uuid', sa.String(length=32), autoincrement=False, nullable=False),
|
|
|
|
|
sa.Column('full_name', sa.String(length=100), autoincrement=False, nullable=False),
|
|
|
|
|
sa.Column('full_name', sa.String(length=100), autoincrement=False, nullable=True),
|
|
|
|
|
sa.Column('first_name', sa.String(length=50), autoincrement=False, nullable=True),
|
|
|
|
|
sa.Column('middle_name', sa.String(length=50), autoincrement=False, nullable=True),
|
|
|
|
|
sa.Column('last_name', sa.String(length=50), autoincrement=False, nullable=True),
|
|
|
|
@ -50,10 +50,10 @@ def upgrade() -> None:
|
|
|
|
|
# user
|
|
|
|
|
op.create_table('user_version',
|
|
|
|
|
sa.Column('uuid', sa.String(length=32), autoincrement=False, nullable=False),
|
|
|
|
|
sa.Column('username', sa.String(length=25), autoincrement=False, nullable=False),
|
|
|
|
|
sa.Column('username', sa.String(length=25), autoincrement=False, nullable=True),
|
|
|
|
|
sa.Column('password', sa.String(length=60), autoincrement=False, nullable=True),
|
|
|
|
|
sa.Column('person_uuid', sa.String(length=32), autoincrement=False, nullable=True),
|
|
|
|
|
sa.Column('active', sa.Boolean(), autoincrement=False, nullable=False),
|
|
|
|
|
sa.Column('active', sa.Boolean(), autoincrement=False, nullable=True),
|
|
|
|
|
sa.Column('transaction_id', sa.BigInteger(), autoincrement=False, nullable=False),
|
|
|
|
|
sa.Column('end_transaction_id', sa.BigInteger(), nullable=True),
|
|
|
|
|
sa.Column('operation_type', sa.SmallInteger(), nullable=False),
|
|
|
|
@ -66,7 +66,7 @@ def upgrade() -> None:
|
|
|
|
|
# role
|
|
|
|
|
op.create_table('role_version',
|
|
|
|
|
sa.Column('uuid', sa.String(length=32), autoincrement=False, nullable=False),
|
|
|
|
|
sa.Column('name', sa.String(length=100), autoincrement=False, nullable=False),
|
|
|
|
|
sa.Column('name', sa.String(length=100), autoincrement=False, nullable=True),
|
|
|
|
|
sa.Column('notes', sa.Text(), autoincrement=False, nullable=True),
|
|
|
|
|
sa.Column('transaction_id', sa.BigInteger(), autoincrement=False, nullable=False),
|
|
|
|
|
sa.Column('end_transaction_id', sa.BigInteger(), nullable=True),
|
|
|
|
@ -80,8 +80,8 @@ def upgrade() -> None:
|
|
|
|
|
# user_x_role
|
|
|
|
|
op.create_table('user_x_role_version',
|
|
|
|
|
sa.Column('uuid', sa.String(length=32), autoincrement=False, nullable=False),
|
|
|
|
|
sa.Column('user_uuid', sa.String(length=32), autoincrement=False, nullable=False),
|
|
|
|
|
sa.Column('role_uuid', sa.String(length=32), autoincrement=False, nullable=False),
|
|
|
|
|
sa.Column('user_uuid', sa.String(length=32), autoincrement=False, nullable=True),
|
|
|
|
|
sa.Column('role_uuid', sa.String(length=32), autoincrement=False, nullable=True),
|
|
|
|
|
sa.Column('transaction_id', sa.BigInteger(), autoincrement=False, nullable=False),
|
|
|
|
|
sa.Column('end_transaction_id', sa.BigInteger(), nullable=True),
|
|
|
|
|
sa.Column('operation_type', sa.SmallInteger(), nullable=False),
|
|
|
|
|