-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* added change for param search * upgrade the migration file
- Loading branch information
1 parent
a0c29f7
commit 3e8874d
Showing
3 changed files
with
55 additions
and
21 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
forms-flow-api/migrations/versions/c8e7baa093ba_filter_updation.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
"""empty message | ||
Revision ID: c8e7baa093ba | ||
Revises: 77d8b68e6c1f | ||
Create Date: 2024-06-12 15:16:54.882030 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = 'c8e7baa093ba' | ||
down_revision = '77d8b68e6c1f' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
conn = op.get_bind() | ||
conn.execute(sa.text(''' | ||
UPDATE public."filter" f SET criteria = (f.criteria::jsonb - 'processDefinitionNameLike') || | ||
jsonb_build_object('processDefinitionKey', fpm.process_key) FROM public.form_process_mapper fpm | ||
WHERE f.criteria IS NOT NULL AND f.criteria::jsonb->>'processDefinitionNameLike' LIKE '%' || SPLIT_PART(fpm.process_name, ' (', 1) || '%'; | ||
''')) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
pass | ||
# ### end Alembic commands ### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters