-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5372 from bcgov/test-marshal-AH-FOIMOD-2646-dev
Test Marshal <> Dev Merge August 20 2024
- Loading branch information
Showing
13 changed files
with
119 additions
and
23 deletions.
There are no files selected for viewing
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
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
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
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
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
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
43 changes: 43 additions & 0 deletions
43
request-management-api/migrations/versions/06283c0685fb_update_cfd_personal_tags.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,43 @@ | ||
"""update CFD Personal tags | ||
Revision ID: 06283c0685fb | ||
Revises: bbee01df3e8d | ||
Create Date: 2024-08-14 12:40:37.844463 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = '06283c0685fb' | ||
down_revision = 'bbee01df3e8d' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
filetypes = ["CS","FS","ICM","CYMH","RE","CYSN","AD_C","DIV","AA","AH","AO","FH","MAPLES","SP","PABS","VAN-AA","VAN-CAS","VAN-CIC","VAN-CCAS","VIC-AA","YAG","Autism Case File","Assessment & Resource","AR ","AS","AM","AP","CC","Choices","CIC","CS UNREG","CT","CH","FS UNREG","RE UNREG","SN","Woodlands","Incident","Memo ","Service Request","FS Case","CS Case","SR Case","Complaint"] | ||
ftsortorder = 1 | ||
|
||
op.execute('UPDATE public."ProgramAreaDivisions" SET isactive = FALSE WHERE programareaid in (SELECT programareaid FROM public."ProgramAreas" WHERE iaocode =\'CFD\') AND type = \'filetype\'') | ||
for ftype in filetypes: | ||
op.execute('INSERT INTO public."ProgramAreaDivisions"(programareaid, name, isactive, created_at, createdby, sortorder, issection, specifictopersonalrequests, type)\ | ||
VALUES ((SELECT programareaid FROM public."ProgramAreas" WHERE iaocode =\'CFD\'), \''+ftype+'\', TRUE, NOW(), \'system\', '+ str(ftsortorder) +', FALSE, TRUE, \'filetype\');') | ||
ftsortorder = ftsortorder+1 | ||
|
||
|
||
sections = ["Accountability","Activity Forms","Adoption","ADR","Agreements and Approvals","Caregiver Information","Case Conference","Case Notes","Case Snapshot","Change Card and Forms","Child and Birth Family Background","Child in Care Information","Collaborative Planning","Consents and Authorizations","Contracts","Correspondence","Cultural Planning","Documents","Education, Employment and Training","External Assessments","Family Group Mediation","File Summary","Financial","Incidents","Internal Assessments","Inside Back Cover","Inside Front Cover","Intake and Investigation","Legal","Maples","Mediation","Medical","Note Pad Screens","Out-of-Care Services","Personal History and Records","Physical File Summary","Placement Slips","Planning","Protocol and Incidents","Reconsideration","Running Record","Referrals","Relief Care Giver Documentation","Reports","Reviews","Services for Children Not in Care","Supervisor Orders","Young Offenders"] | ||
secsortorder = 1 | ||
|
||
op.execute('UPDATE public."ProgramAreaDivisions" SET isactive = FALSE WHERE programareaid in (SELECT programareaid FROM public."ProgramAreas" WHERE iaocode =\'CFD\') AND type = \'section\' AND name != \'TBD\'') | ||
for sec in sections: | ||
op.execute('INSERT INTO public."ProgramAreaDivisions"(programareaid, name, isactive, created_at, createdby, sortorder, issection, specifictopersonalrequests, type)\ | ||
VALUES ((SELECT programareaid FROM public."ProgramAreas" WHERE iaocode =\'CFD\'), \''+sec+'\', TRUE, NOW(), \'system\', '+ str(secsortorder) +', TRUE, TRUE, \'section\');') | ||
secsortorder = secsortorder+1 | ||
|
||
op.execute('UPDATE public."ProgramAreaDivisions" SET sortorder = '+str(secsortorder)+' WHERE programareaid in (SELECT programareaid FROM public."ProgramAreas" WHERE iaocode =\'CFD\') AND type = \'section\' AND name = \'TBD\'') | ||
|
||
def downgrade(): | ||
op.execute('UPDATE public."ProgramAreaDivisions" SET isactive = FALSE WHERE programareaid in (SELECT programareaid FROM public."ProgramAreas" WHERE iaocode =\'CFD\') AND type = \'filetype\'') | ||
op.execute('UPDATE public."ProgramAreaDivisions" SET isactive = FALSE WHERE programareaid in (SELECT programareaid FROM public."ProgramAreas" WHERE iaocode =\'CFD\') AND type = \'section\' AND name != \'TBD\'') |
32 changes: 32 additions & 0 deletions
32
...-management-api/migrations/versions/1d60153653db_update_cfd_personal_sections_sorting_.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,32 @@ | ||
"""Update CFD Personal Sections Sorting Order | ||
Revision ID: 1d60153653db | ||
Revises: 06283c0685fb | ||
Create Date: 2024-08-19 09:36:01.403157 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = '1d60153653db' | ||
down_revision = '06283c0685fb' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
sections = ["Activity Forms","Adoption","Case Notes","Change Card and Forms","Collaborative Planning","Correspondence","Cultural Planning","Education, Employment and Training","External Assessments","Family Group Mediation","Financial","Incidents","Internal Assessments","Inside Back Cover","Inside Front Cover","Intake and Investigation","Legal","Medical","Personal History and Records","Young Offenders","Accountability","ADR","Agreements and Approvals","Caregiver Information","Case Conference","Case Snapshot","Child and Birth Family Background","Child in Care Information","Consents and Authorizations","Contracts","Documents","File Summary","Maples","Mediation","Note Pad Screens","Out-of-Care Services","Physical File Summary","Placement Slips","Planning","Protocol and Incidents","Reconsideration","Running Record","Referrals","Relief Care Giver Documentation","Reports","Reviews","Services for Children Not in Care","Supervisor Orders"] | ||
secsortorder = 1 | ||
|
||
op.execute('UPDATE public."ProgramAreaDivisions" SET isactive = FALSE WHERE programareaid in (SELECT programareaid FROM public."ProgramAreas" WHERE iaocode =\'CFD\') AND type = \'section\' AND name != \'TBD\'') | ||
for sec in sections: | ||
op.execute('INSERT INTO public."ProgramAreaDivisions"(programareaid, name, isactive, created_at, createdby, sortorder, issection, specifictopersonalrequests, type)\ | ||
VALUES ((SELECT programareaid FROM public."ProgramAreas" WHERE iaocode =\'CFD\'), \''+sec+'\', TRUE, NOW(), \'system\', '+ str(secsortorder) +', TRUE, TRUE, \'section\');') | ||
secsortorder = secsortorder+1 | ||
|
||
op.execute('UPDATE public."ProgramAreaDivisions" SET sortorder = '+str(secsortorder)+' WHERE programareaid in (SELECT programareaid FROM public."ProgramAreas" WHERE iaocode =\'CFD\') AND type = \'section\' AND name = \'TBD\'') | ||
|
||
def downgrade(): | ||
op.execute('UPDATE public."ProgramAreaDivisions" SET isactive = FALSE WHERE programareaid in (SELECT programareaid FROM public."ProgramAreas" WHERE iaocode =\'CFD\') AND type = \'section\' AND name != \'TBD\'') |