Skip to content

Commit

Permalink
Merge branch 'main' into activity-category-codetable
Browse files Browse the repository at this point in the history
  • Loading branch information
yzlucas authored Jan 24, 2025
2 parents 3a3136e + ec4c853 commit cdb86ed
Show file tree
Hide file tree
Showing 10 changed files with 709 additions and 1 deletion.
75 changes: 74 additions & 1 deletion db/app_wf1_prev-changelog.json
Original file line number Diff line number Diff line change
Expand Up @@ -871,6 +871,79 @@
{ "sql": "DROP TABLE wfprev.reporting_period_code" }
]
}
}
},
{
"changeSet": {
"id": "01_00_10_00",
"author": "hsaldyga",
"tagDatabase": { "tag" : "version_01_00_10_00" },
"changes": [
{ "sql": "UPDATE wfprev.bc_parks_org_unit SET org_unit_name = 'Kootenay' WHERE org_unit_identifier = 10" },
{
"sqlFile": {
"dbms": "postgresql", "endDelimiter": ";",
"path": "scripts/01_00_10/00/ddl/WFPREV.burn_impl_season_code.sql"
}
},
{
"sqlFile": {
"dbms": "postgresql", "endDelimiter": ";",
"path": "scripts/01_00_10/00/ddl/WFPREV.fuel_management_plan.sql"
}
},
{
"sqlFile": {
"dbms": "postgresql", "endDelimiter": ";",
"path": "scripts/01_00_10/00/ddl/WFPREV.fuel_management_plan_audit.sql"
}
},
{
"sqlFile": {
"dbms": "postgresql", "endDelimiter": ";",
"path": "scripts/01_00_10/00/ddl/wfprev.ddl.drop_misnamed_tables.sql"
}
},
{
"sqlFile": {
"dbms": "postgresql", "endDelimiter": ";",
"path": "scripts/01_00_10/00/ddl/WFPREV.cultural_rx_fire_plan.sql"
}
},
{
"sqlFile": {
"dbms": "postgresql", "endDelimiter": ";",
"path": "scripts/01_00_10/00/ddl/WFPREV.cultural_rx_fire_plan_audit.sql"
}
},
{
"sqlFile": {
"dbms": "postgresql", "endDelimiter": ";",
"path": "scripts/01_00_10/00/ddl/WFPREV.cultural_rx_fire_project.sql"
}
},
{
"sqlFile": {
"dbms": "postgresql", "endDelimiter": ";",
"path": "scripts/01_00_10/00/ddl/WFPREV.cultural_rx_fire_prj_audit.sql"
}
},
{
"sqlFile": {
"dbms": "postgresql", "endDelimiter": ";",
"path": "scripts/01_00_10/00/dml/app_wf1_prev.dml.burn_impl_season_code.sql"
}
}
],
"rollback": [
{ "sql": "DROP TABLE wfprev.cultural_rx_fire_prj_audit" },
{ "sql": "DROP TABLE wfprev.cultural_rx_fire_project" },
{ "sql": "DROP TABLE wfprev.cultural_rx_fire_plan_audit" },
{ "sql": "DROP TABLE wfprev.cultural_rx_fire_plan" },
{ "sql": "DROP TABLE wfprev.fuel_management_plan_audit" },
{ "sql": "DROP TABLE wfprev.fuel_management_plan" },
{ "sql": "DROP TABLE wfprev.burn_impl_season_code" }
]
}
}
]
}
75 changes: 75 additions & 0 deletions db/scripts/01_00_10/00/ddl/WFPREV.burn_impl_season_code.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
/* ---------------------------------------------------- */
/* Generated by Enterprise Architect Version 12.0 */
/* Created On : 21-Jan-2025 4:21:55 PM */
/* DBMS : PostgreSQL */
/* ---------------------------------------------------- */

/* Create Tables */

CREATE TABLE "wfprev"."burn_impl_season_code"
(
"burn_impl_season_code" varchar(10) NOT NULL, -- burn_impl_season_code: Burn Implementation Season Code defines the seasons when a burn can be implemented. Values are: - Spring - Summer - Fall - Winter
"description" varchar(200) NOT NULL, -- DESCRIPTION is the display quality description of the code value.
"display_order" decimal(3) NULL, -- DISPLAY ORDER is to allow non alphabetic sorting e.g. M T W Th F S S.
"effective_date" DATE NOT NULL DEFAULT CURRENT_DATE, -- EFFECTIVE_DATE is the date code value becomes effective.
"expiry_date" DATE NOT NULL DEFAULT '9999-12-31', -- EXPIRY_DATE is the date code value expires.
"revision_count" decimal(10) NOT NULL DEFAULT 0, -- REVISION_COUNT is the number of times that the row of data has been changed. The column is used for optimistic locking via application code.
"create_user" varchar(64) NOT NULL, -- CREATE_USER is an audit column that indicates the user that created the record.
"create_date" DATE NOT NULL DEFAULT CURRENT_TIMESTAMP, -- CREATE_DATE is the date and time the row of data was created.
"update_user" varchar(64) NOT NULL, -- UPDATE_USER is an audit column that indicates the user that updated the record.
"update_date" DATE NOT NULL DEFAULT CURRENT_TIMESTAMP -- UPDATE_DATE is the date and time the row of data was updated.
)
TABLESPACE PG_DEFAULT
;

/* Create Table Comments, Sequences for Autonumber Columns */

COMMENT ON TABLE "wfprev"."burn_impl_season_code"
IS 'Burn Implementation Season Code defines the seasons when a burn can be implemented. Values are: - Spring - Summer - Fall - Winter'
;

COMMENT ON COLUMN "wfprev"."burn_impl_season_code"."burn_impl_season_code"
IS 'burn_impl_season_code: Burn Implementation Season Code defines the seasons when a burn can be implemented. Values are: - Spring - Summer - Fall - Winter'
;

COMMENT ON COLUMN "wfprev"."burn_impl_season_code"."description"
IS 'DESCRIPTION is the display quality description of the code value.'
;

COMMENT ON COLUMN "wfprev"."burn_impl_season_code"."display_order"
IS 'DISPLAY ORDER is to allow non alphabetic sorting e.g. M T W Th F S S.'
;

COMMENT ON COLUMN "wfprev"."burn_impl_season_code"."effective_date"
IS 'EFFECTIVE_DATE is the date code value becomes effective.'
;

COMMENT ON COLUMN "wfprev"."burn_impl_season_code"."expiry_date"
IS 'EXPIRY_DATE is the date code value expires.'
;

COMMENT ON COLUMN "wfprev"."burn_impl_season_code"."revision_count"
IS 'REVISION_COUNT is the number of times that the row of data has been changed. The column is used for optimistic locking via application code.'
;

COMMENT ON COLUMN "wfprev"."burn_impl_season_code"."create_user"
IS 'CREATE_USER is an audit column that indicates the user that created the record.'
;

COMMENT ON COLUMN "wfprev"."burn_impl_season_code"."create_date"
IS 'CREATE_DATE is the date and time the row of data was created.'
;

COMMENT ON COLUMN "wfprev"."burn_impl_season_code"."update_user"
IS 'UPDATE_USER is an audit column that indicates the user that updated the record.'
;

COMMENT ON COLUMN "wfprev"."burn_impl_season_code"."update_date"
IS 'UPDATE_DATE is the date and time the row of data was updated.'
;

/* Create Primary Keys, Indexes, Uniques, Checks */

ALTER TABLE "wfprev"."burn_impl_season_code" ADD CONSTRAINT "biscd_pk"
PRIMARY KEY ("burn_impl_season_code")
;
104 changes: 104 additions & 0 deletions db/scripts/01_00_10/00/ddl/WFPREV.cultural_rx_fire_plan.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
/* ---------------------------------------------------- */
/* Generated by Enterprise Architect Version 12.0 */
/* Created On : 21-Jan-2025 4:29:43 PM */
/* DBMS : PostgreSQL */
/* ---------------------------------------------------- */

/* Create Tables */

CREATE TABLE "wfprev"."cultural_rx_fire_plan"
(
"cultural_rx_fire_plan_guid" UUID NOT NULL, -- cultural_rx_fire_plan_guid is a unique identifier for the record.
"project_plan_fiscal_guid" UUID NOT NULL, -- project_plan_fiscal_guid: Is a foreign key to project_plan_fiscal: Project Plan Fiscal is used to store a plan for the work to be done in a fiscal year for the project.
"burn_impl_season_code" varchar(10) NULL, -- burn_impl_season_code: Is a foreign key to burn_impl_season_code: Burn Implementation Season Code defines the seasons when a burn can be implemented. Values are: - Spring - Summer - Fall - Winter
"developed_with_first_natio_ind" boolean NOT NULL DEFAULT 'N', -- Developed WIth First Nations Ind indicates whether the project was developed or co-development with First Nations (Y) or not (N).
"first_nations_partnership_ind" boolean NOT NULL DEFAULT 'N', -- First Nations Partnership Ind indicates whether this project demonstrate a partnership with First Nations (Y) or not (N). Exampled of a demonstrated partnership are Incorporate Traditional Ecological Knowledge, cultural burning practices, etc.,
"maximizes_funding_integr_ind" boolean NOT NULL DEFAULT 'N', -- Maximizes Funding and Integration Ind indicates whether Funding and Integration has been maximized for the project (Y) or not (N). Projects that maximize non-CLWRR funding sources (ex: LBI, HCTF) or have value integration linkages with activities, projects or programs undertaken to achieve broader government objectives (ex: ecosystem restoration, other WRR work, habitat restoration, silviculture, etc).
"capacity_development_opp_ind" boolean NOT NULL DEFAULT 'N', -- Capacity Development Opportunity Ind indicates whether the project provides opportunities to train or increase capacity within or external to government (Y) or not (N).
"revision_count" decimal(10) NOT NULL DEFAULT 0, -- REVISION_COUNT is the number of times that the row of data has been changed. The column is used for optimistic locking via application code.
"create_user" varchar(64) NOT NULL, -- CREATE_USER is an audit column that indicates the user that created the record.
"create_date" DATE NOT NULL DEFAULT CURRENT_TIMESTAMP, -- CREATE_DATE is the date and time the row of data was created.
"update_user" varchar(64) NOT NULL, -- UPDATE_USER is an audit column that indicates the user that updated the record.
"update_date" DATE NOT NULL DEFAULT CURRENT_TIMESTAMP -- UPDATE_DATE is the date and time the row of data was updated.
)
TABLESPACE PG_DEFAULT
;

/* Create Table Comments, Sequences for Autonumber Columns */

COMMENT ON TABLE "wfprev"."cultural_rx_fire_plan"
IS 'Cultural And Prescribed Fire Plan is a subclass of a Project Fiscal Plan and contains attributes specific to Cultural and Prescribed Fire Project Plans'
;

COMMENT ON COLUMN "wfprev"."cultural_rx_fire_plan"."cultural_rx_fire_plan_guid"
IS 'cultural_rx_fire_plan_guid is a unique identifier for the record.'
;

COMMENT ON COLUMN "wfprev"."cultural_rx_fire_plan"."project_plan_fiscal_guid"
IS 'project_plan_fiscal_guid: Is a foreign key to project_plan_fiscal: Project Plan Fiscal is used to store a plan for the work to be done in a fiscal year for the project. '
;

COMMENT ON COLUMN "wfprev"."cultural_rx_fire_plan"."burn_impl_season_code"
IS 'burn_impl_season_code: Is a foreign key to burn_impl_season_code: Burn Implementation Season Code defines the seasons when a burn can be implemented. Values are: - Spring - Summer - Fall - Winter'
;

COMMENT ON COLUMN "wfprev"."cultural_rx_fire_plan"."developed_with_first_natio_ind"
IS 'Developed WIth First Nations Ind indicates whether the project was developed or co-development with First Nations (Y) or not (N).'
;

COMMENT ON COLUMN "wfprev"."cultural_rx_fire_plan"."first_nations_partnership_ind"
IS 'First Nations Partnership Ind indicates whether this project demonstrate a partnership with First Nations (Y) or not (N). Exampled of a demonstrated partnership are Incorporate Traditional Ecological Knowledge, cultural burning practices, etc.,'
;

COMMENT ON COLUMN "wfprev"."cultural_rx_fire_plan"."maximizes_funding_integr_ind"
IS 'Maximizes Funding and Integration Ind indicates whether Funding and Integration has been maximized for the project (Y) or not (N). Projects that maximize non-CLWRR funding sources (ex: LBI, HCTF) or have value integration linkages with activities, projects or programs undertaken to achieve broader government objectives (ex: ecosystem restoration, other WRR work, habitat restoration, silviculture, etc).'
;

COMMENT ON COLUMN "wfprev"."cultural_rx_fire_plan"."capacity_development_opp_ind"
IS 'Capacity Development Opportunity Ind indicates whether the project provides opportunities to train or increase capacity within or external to government (Y) or not (N). '
;

COMMENT ON COLUMN "wfprev"."cultural_rx_fire_plan"."revision_count"
IS 'REVISION_COUNT is the number of times that the row of data has been changed. The column is used for optimistic locking via application code.'
;

COMMENT ON COLUMN "wfprev"."cultural_rx_fire_plan"."create_user"
IS 'CREATE_USER is an audit column that indicates the user that created the record.'
;

COMMENT ON COLUMN "wfprev"."cultural_rx_fire_plan"."create_date"
IS 'CREATE_DATE is the date and time the row of data was created.'
;

COMMENT ON COLUMN "wfprev"."cultural_rx_fire_plan"."update_user"
IS 'UPDATE_USER is an audit column that indicates the user that updated the record.'
;

COMMENT ON COLUMN "wfprev"."cultural_rx_fire_plan"."update_date"
IS 'UPDATE_DATE is the date and time the row of data was updated.'
;

/* Create Primary Keys, Indexes, Uniques, Checks */

ALTER TABLE "wfprev"."cultural_rx_fire_plan" ADD CONSTRAINT "cpfp_pk"
PRIMARY KEY ("cultural_rx_fire_plan_guid")
;

ALTER TABLE "wfprev"."cultural_rx_fire_plan" ADD CONSTRAINT "cpfp_uk" UNIQUE ("project_plan_fiscal_guid")
;

CREATE INDEX "cpfp_biscd_idx" ON "wfprev"."cultural_rx_fire_plan" ("burn_impl_season_code" ASC)
;

CREATE INDEX "cpfp_prjpfy_idx" ON "wfprev"."cultural_rx_fire_plan" ("project_plan_fiscal_guid" ASC)
;

/* Create Foreign Key Constraints */

ALTER TABLE "wfprev"."cultural_rx_fire_plan" ADD CONSTRAINT "cpfp_biscd_fk"
FOREIGN KEY ("burn_impl_season_code") REFERENCES "wfprev"."burn_impl_season_code" ("burn_impl_season_code") ON DELETE No Action ON UPDATE No Action
;

ALTER TABLE "wfprev"."cultural_rx_fire_plan" ADD CONSTRAINT "cpfp_prjpfy_fk"
FOREIGN KEY ("project_plan_fiscal_guid") REFERENCES "wfprev"."project_plan_fiscal" ("project_plan_fiscal_guid") ON DELETE No Action ON UPDATE No Action
;
Loading

0 comments on commit cdb86ed

Please sign in to comment.