diff --git a/spiffworkflow-backend/migrations/env.py b/spiffworkflow-backend/migrations/env.py index 630e381a..68feded2 100644 --- a/spiffworkflow-backend/migrations/env.py +++ b/spiffworkflow-backend/migrations/env.py @@ -1,3 +1,5 @@ +from __future__ import with_statement + import logging from logging.config import fileConfig diff --git a/spiffworkflow-backend/migrations/versions/3ad01a365c17_.py b/spiffworkflow-backend/migrations/versions/25f64177f8ec_.py similarity index 98% rename from spiffworkflow-backend/migrations/versions/3ad01a365c17_.py rename to spiffworkflow-backend/migrations/versions/25f64177f8ec_.py index 1378ae02..eb7b9295 100644 --- a/spiffworkflow-backend/migrations/versions/3ad01a365c17_.py +++ b/spiffworkflow-backend/migrations/versions/25f64177f8ec_.py @@ -1,8 +1,8 @@ """empty message -Revision ID: 3ad01a365c17 +Revision ID: 25f64177f8ec Revises: -Create Date: 2023-03-03 11:36:56.060834 +Create Date: 2023-03-03 12:03:28.155345 """ from alembic import op @@ -10,7 +10,7 @@ import sqlalchemy as sa # revision identifiers, used by Alembic. -revision = '3ad01a365c17' +revision = '25f64177f8ec' down_revision = None branch_labels = None depends_on = None @@ -23,7 +23,6 @@ def upgrade(): sa.Column('parent_process_id', sa.Integer(), nullable=True), sa.Column('properties_json', sa.JSON(), nullable=False), sa.Column('json_data_hash', sa.String(length=255), nullable=False), - sa.Column('process_type', sa.String(length=30), nullable=False), sa.ForeignKeyConstraint(['parent_process_id'], ['bpmn_process.id'], ), sa.PrimaryKeyConstraint('id') ) @@ -31,7 +30,7 @@ def upgrade(): op.create_table('bpmn_process_definition', sa.Column('id', sa.Integer(), nullable=False), sa.Column('hash', sa.String(length=255), nullable=False), - sa.Column('bpmn_identifier', sa.String(length=255, collation='utf8mb4_0900_as_cs'), nullable=False), + sa.Column('bpmn_identifier', sa.String(length=255), nullable=False), sa.Column('properties_json', sa.JSON(), nullable=False), sa.Column('type', sa.String(length=32), nullable=True), sa.Column('bpmn_version_control_type', sa.String(length=50), nullable=True), @@ -219,7 +218,7 @@ def upgrade(): op.create_table('task_definition', sa.Column('id', sa.Integer(), nullable=False), sa.Column('bpmn_process_definition_id', sa.Integer(), nullable=False), - sa.Column('bpmn_identifier', sa.String(length=255, collation='utf8mb4_0900_as_cs'), nullable=False), + sa.Column('bpmn_identifier', sa.String(length=255), nullable=False), sa.Column('properties_json', sa.JSON(), nullable=False), sa.Column('typename', sa.String(length=255), nullable=False), sa.ForeignKeyConstraint(['bpmn_process_definition_id'], ['bpmn_process_definition.id'], ), diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/models/bpmn_process.py b/spiffworkflow-backend/src/spiffworkflow_backend/models/bpmn_process.py index 948cdffd..0d7e556d 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/models/bpmn_process.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/models/bpmn_process.py @@ -22,4 +22,4 @@ class BpmnProcessModel(SpiffworkflowBaseDBModel): json_data_hash: str = db.Column(db.String(255), nullable=False, index=True) # subprocess or top_level_process - process_type: str = db.Column(db.String(30), nullable=False) + # process_type: str = db.Column(db.String(30), nullable=False) diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/models/bpmn_process_definition.py b/spiffworkflow-backend/src/spiffworkflow_backend/models/bpmn_process_definition.py index 916cf7d7..eec715c3 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/models/bpmn_process_definition.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/models/bpmn_process_definition.py @@ -16,8 +16,9 @@ class BpmnProcessDefinitionModel(SpiffworkflowBaseDBModel): # this is a sha256 hash of spec and serializer_version hash: str = db.Column(db.String(255), nullable=False, index=True, unique=True) + bpmn_identifier: str = db.Column( - db.String(255, collation="utf8mb4_0900_as_cs"), nullable=False, index=True + db.String(255), nullable=False, index=True ) properties_json: str = db.Column(db.JSON, nullable=False) diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/models/task_definition.py b/spiffworkflow-backend/src/spiffworkflow_backend/models/task_definition.py index 8c70bbd0..f4f5c997 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/models/task_definition.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/models/task_definition.py @@ -28,7 +28,7 @@ class TaskDefinitionModel(SpiffworkflowBaseDBModel): bpmn_process_definition = relationship(BpmnProcessDefinitionModel) bpmn_identifier: str = db.Column( - db.String(255, collation="utf8mb4_0900_as_cs"), nullable=False, index=True + db.String(255), nullable=False, index=True ) properties_json: dict = db.Column(db.JSON, nullable=False) typename: str = db.Column(db.String(255), nullable=False)