diff --git a/spiffworkflow-backend/migrations/versions/ebf5e733d109_.py b/spiffworkflow-backend/migrations/versions/ebf5e733d109_.py new file mode 100644 index 00000000..53b9fe04 --- /dev/null +++ b/spiffworkflow-backend/migrations/versions/ebf5e733d109_.py @@ -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 ### diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/models/human_task.py b/spiffworkflow-backend/src/spiffworkflow_backend/models/human_task.py index e2d017a4..635a3155 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/models/human_task.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/models/human_task.py @@ -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)