remove task_data column
This commit is contained in:
parent
b9cd1c0684
commit
7e1ce35c27
|
@ -23,14 +23,10 @@ docker run \
|
|||
-Dkeycloak.profile.feature.token_exchange=enabled \
|
||||
-Dkeycloak.profile.feature.admin_fine_grained_authz=enabled
|
||||
|
||||
docker cp bin/finance-realm.json keycloak:/tmp
|
||||
docker cp bin/spiffworkflow-realm.json keycloak:/tmp
|
||||
docker cp bin/quarkus-realm.json keycloak:/tmp
|
||||
|
||||
sleep 10
|
||||
docker exec keycloak /opt/keycloak/bin/kc.sh import --file /tmp/finance-realm.json || echo ''
|
||||
docker exec keycloak /opt/keycloak/bin/kc.sh import --file /tmp/spiffworkflow-realm.json || echo ''
|
||||
docker exec keycloak /opt/keycloak/bin/kc.sh import --file /tmp/quarkus-realm.json || echo ''
|
||||
|
||||
echo 'imported realms'
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
"""empty message
|
||||
|
||||
Revision ID: e6b28d8e3178
|
||||
Revision ID: e12e98d4e7e4
|
||||
Revises:
|
||||
Create Date: 2022-10-20 13:05:25.896486
|
||||
Create Date: 2022-10-21 08:53:52.815491
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
|
@ -10,7 +10,7 @@ import sqlalchemy as sa
|
|||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = 'e6b28d8e3178'
|
||||
revision = 'e12e98d4e7e4'
|
||||
down_revision = None
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
@ -176,7 +176,6 @@ def upgrade():
|
|||
sa.Column('task_type', sa.String(length=50), nullable=True),
|
||||
sa.Column('task_status', sa.String(length=50), nullable=True),
|
||||
sa.Column('process_model_display_name', sa.String(length=255), nullable=True),
|
||||
sa.Column('task_data', sa.Text(length=4294000000), nullable=True),
|
||||
sa.ForeignKeyConstraint(['assigned_principal_id'], ['principal.id'], ),
|
||||
sa.ForeignKeyConstraint(['process_instance_id'], ['process_instance.id'], ),
|
||||
sa.PrimaryKeyConstraint('id'),
|
|
@ -1,7 +1,6 @@
|
|||
"""Active_task."""
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
from dataclasses import dataclass
|
||||
|
||||
from flask_bpmn.models.db import db
|
||||
|
@ -46,20 +45,16 @@ class ActiveTaskModel(SpiffworkflowBaseDBModel):
|
|||
task_type = db.Column(db.String(50))
|
||||
task_status = db.Column(db.String(50))
|
||||
process_model_display_name = db.Column(db.String(255))
|
||||
task_data: str = db.Column(db.Text(4294000000))
|
||||
|
||||
@classmethod
|
||||
def to_task(cls, task: ActiveTaskModel) -> Task:
|
||||
"""To_task."""
|
||||
task_data = json.loads(task.task_data)
|
||||
|
||||
new_task = Task(
|
||||
task.task_id,
|
||||
task.task_name,
|
||||
task.task_title,
|
||||
task.task_type,
|
||||
task.task_status,
|
||||
data=task_data,
|
||||
process_instance_id=task.process_instance_id,
|
||||
)
|
||||
if hasattr(task, "process_model_display_name"):
|
||||
|
|
|
@ -898,7 +898,6 @@ def task_list_my_tasks(page: int = 1, per_page: int = 100) -> flask.wrappers.Res
|
|||
.add_columns(
|
||||
ProcessInstanceModel.process_model_identifier,
|
||||
ProcessInstanceModel.process_group_identifier,
|
||||
ActiveTaskModel.task_data,
|
||||
ActiveTaskModel.task_name,
|
||||
ActiveTaskModel.task_title,
|
||||
ActiveTaskModel.task_type,
|
||||
|
|
|
@ -563,7 +563,6 @@ class ProcessInstanceProcessor:
|
|||
task_title=ready_or_waiting_task.task_spec.description,
|
||||
task_type=ready_or_waiting_task.task_spec.__class__.__name__,
|
||||
task_status=ready_or_waiting_task.get_state_name(),
|
||||
task_data=json.dumps(ready_or_waiting_task.data),
|
||||
)
|
||||
db.session.add(active_task)
|
||||
|
||||
|
|
Loading…
Reference in New Issue