mirror of
https://github.com/sartography/cr-connect-workflow.git
synced 2025-02-23 21:28:32 +00:00
In order to allow proper deletion of tasks, we no longer merge data returned from the front end, we set it directly as the task_data. When returning data to the front end, we take any previous form submission and merge it into the current task data, allowing users to keep their previous submissions. There is now an "extract_form_data" method that does it's best job to calculate what form data might have changed from the front end.
31 lines
883 B
Python
31 lines
883 B
Python
"""empty message
|
|
|
|
Revision ID: de30304ff5e6
|
|
Revises: 1fdd1bdb600e
|
|
Create Date: 2020-06-18 16:19:11.133665
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
from sqlalchemy.dialects import postgresql
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = 'de30304ff5e6'
|
|
down_revision = '1fdd1bdb600e'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.add_column('task_event', sa.Column('form_data', sa.JSON(), nullable=True))
|
|
op.drop_column('task_event', 'task_data')
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.add_column('task_event', sa.Column('task_data', postgresql.JSON(astext_type=sa.Text()), autoincrement=False, nullable=True))
|
|
op.drop_column('task_event', 'form_data')
|
|
# ### end Alembic commands ###
|