-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change in actions, event templates (#1290)
* project notification template updated + master templates added * removing suspension and resumption * template changes/ assessment template * - Create API to import data from Excels to master tables - #1204 - Created APIs to import: - indigenous nations - projects - proponents - staff - Added migration script to load new look up data - Added new field bcgid to indigenous nations - Actions now send time converted PST to respective service calls - Removed redundant session.commit() from actions - Added new project state values 'CLOSED', 'UNDER_DESIGNATION' * actions, change in templates --------- Co-authored-by: salabh-an <salabh.n@aot-technologies.com>
- Loading branch information
1 parent
ba775be
commit 02dbeec
Showing
70 changed files
with
2,017 additions
and
347 deletions.
There are no files selected for viewing
109 changes: 109 additions & 0 deletions
109
epictrack-api/migrations/versions/14cebe9c6b1f_work_types.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,109 @@ | ||
"""work_types | ||
Revision ID: 14cebe9c6b1f | ||
Revises: dac396b13921 | ||
Create Date: 2023-11-18 12:57:42.637542 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
from sqlalchemy.dialects import postgresql | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = '14cebe9c6b1f' | ||
down_revision = 'dac396b13921' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.execute("TRUNCATE works RESTART IDENTITY CASCADE") | ||
op.execute("TRUNCATE work_phases RESTART IDENTITY CASCADE") | ||
op.execute("TRUNCATE event_templates RESTART IDENTITY CASCADE") | ||
op.execute("TRUNCATE event_templates_history RESTART IDENTITY CASCADE") | ||
op.execute("TRUNCATE event_configurations RESTART IDENTITY CASCADE") | ||
op.execute("TRUNCATE event_configurations_history RESTART IDENTITY CASCADE") | ||
op.execute("TRUNCATE work_types RESTART IDENTITY CASCADE") | ||
work_types = [ | ||
{ | ||
"name": "Project Notification", | ||
"report_title": "Project Notification", | ||
"is_active": True | ||
}, | ||
{ | ||
"name": "Minister''s Designation", | ||
"report_title": "Project Designation Request", | ||
"is_active": True | ||
}, | ||
{ | ||
"name": "CEAO''s Designation", | ||
"report_title": "Project Designation Request", | ||
"is_active": True | ||
}, | ||
{ | ||
"name": "Intake (Pre-EA)", | ||
"report_title": "Intake (Pre-EA)", | ||
"is_active": False | ||
}, | ||
{ | ||
"name": "Exemption Order", | ||
"report_title": "Exemption Order Request", | ||
"is_active": True | ||
}, | ||
{ | ||
"name": "Assessment", | ||
"report_title": "EA Certificate Request", | ||
"is_active": True | ||
}, | ||
{ | ||
"name": "Amendment", | ||
"report_title": "EAC/Order Amendment", | ||
"is_active": True | ||
}, | ||
{ | ||
"name": "Post-EAC Document Review", | ||
"report_title": "Post-Decision Plan Review", | ||
"is_active": False | ||
}, | ||
{ | ||
"name": "EAC Extension", | ||
"report_title": "EAC Extension Request", | ||
"is_active": False | ||
}, | ||
{ | ||
"name": "Substantial Start Decision", | ||
"report_title": "Substantial Start Decision", | ||
"is_active": False | ||
}, | ||
{ | ||
"name": "EAC/Order Transfer", | ||
"report_title": "EAC/Order Transfer", | ||
"is_active": False | ||
}, | ||
{ | ||
"name": "EAC/Order Suspension", | ||
"report_title": "EAC/Order Suspension", | ||
"is_active": False | ||
}, | ||
{ | ||
"name": "EAC/Order Cancellation", | ||
"report_title": "EAC/Order Cancellation", | ||
"is_active": False | ||
}, | ||
{ | ||
"name": "Other", | ||
"report_title": "Other EAO Work", | ||
"is_active": False | ||
} | ||
] | ||
for index, work_type in enumerate(work_types): | ||
op.execute(f"INSERT INTO work_types(name, report_title, sort_order, is_active)VALUES('{work_type['name']}', '{work_type['report_title']}','{(index + 1) if work_type['name'] != 'Other' else 32767}', {work_type['is_active']})") | ||
### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
pass | ||
|
||
# ### end Alembic commands ### |
Oops, something went wrong.