Skip to content

Commit

Permalink
Merge pull request #4903 from bcgov/test-marshal-DV-4707-1
Browse files Browse the repository at this point in the history
small update to the query sequence
  • Loading branch information
divyav-aot authored Dec 15, 2023
2 parents 09c915d + 289930b commit 8120b28
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -212,15 +212,17 @@ def downgrade():
ORDER BY fr.requestid, fr.version DESC, fr.axisrequestid) tmp
WHERE tmp.status::text <> ALL (ARRAY['Archived'::character varying, 'Unopened'::character varying, 'Closed'::character varying]::text[]);
""")
op.execute('ALTER TABLE public."FOIRequestStatuses" drop column statuslabel;')
op.execute('ALTER TABLE public."FOIMinistryRequests" drop column requeststatuslabel;')
op.execute('ALTER TABLE public."FOIRawRequests" drop column requeststatuslabel;')
op.execute('ALTER TABLE public."FOIRequestTeams" drop column requeststatuslabel;')


op.execute('DROP INDEX "FOIMinistryRequests_event";')
op.execute('CREATE INDEX "FOIMinistryRequests_event" ON "FOIMinistryRequests"(axisrequestid, assignedto, assignedgroup, assignedministryperson, assignedministrygroup, requeststatusid);')

op.execute('DROP INDEX "FOIRawRequests_event";')
op.execute('CREATE INDEX "FOIRawRequests_event" ON "FOIRawRequests" (axisrequestid, assignedto, assignedgroup, status);')

op.execute('ALTER TABLE public."FOIRequestStatuses" drop column statuslabel;')
op.execute('ALTER TABLE public."FOIMinistryRequests" drop column requeststatuslabel;')
op.execute('ALTER TABLE public."FOIRawRequests" drop column requeststatuslabel;')
op.execute('ALTER TABLE public."FOIRequestTeams" drop column requeststatuslabel;')


# ### end Alembic commands ###

0 comments on commit 8120b28

Please sign in to comment.