created migration to incrase the human task file names to 255 in the db w/ burnettk (#429)

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
This commit is contained in:
jasquat 2023-08-21 12:28:10 -04:00 committed by GitHub
parent 8ba5616ea8
commit 198f898f14
2 changed files with 48 additions and 2 deletions

View File

@ -0,0 +1,46 @@
"""empty message
Revision ID: ebf5e733d109
Revises: 64adf34a98db
Create Date: 2023-08-03 11:51:07.231821
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = 'ebf5e733d109'
down_revision = '64adf34a98db'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('human_task', schema=None) as batch_op:
batch_op.alter_column('form_file_name',
existing_type=mysql.VARCHAR(collation='utf8mb4_0900_as_cs', length=50),
type_=sa.String(length=255),
existing_nullable=True)
batch_op.alter_column('ui_form_file_name',
existing_type=mysql.VARCHAR(collation='utf8mb4_0900_as_cs', length=50),
type_=sa.String(length=255),
existing_nullable=True)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('human_task', schema=None) as batch_op:
batch_op.alter_column('ui_form_file_name',
existing_type=sa.String(length=255),
type_=mysql.VARCHAR(collation='utf8mb4_0900_as_cs', length=50),
existing_nullable=True)
batch_op.alter_column('form_file_name',
existing_type=sa.String(length=255),
type_=mysql.VARCHAR(collation='utf8mb4_0900_as_cs', length=50),
existing_nullable=True)
# ### end Alembic commands ###

View File

@ -35,8 +35,8 @@ class HumanTaskModel(SpiffworkflowBaseDBModel):
actual_owner_id: int = db.Column(ForeignKey(UserModel.id), index=True) # type: ignore
# actual_owner: RelationshipProperty[UserModel] = relationship(UserModel)
form_file_name: str | None = db.Column(db.String(50))
ui_form_file_name: str | None = db.Column(db.String(50))
form_file_name: str | None = db.Column(db.String(255))
ui_form_file_name: str | None = db.Column(db.String(255))
updated_at_in_seconds: int = db.Column(db.Integer)
created_at_in_seconds: int = db.Column(db.Integer)