diff --git a/Makefile b/Makefile index 851c1978f5..7e959dcac0 100644 --- a/Makefile +++ b/Makefile @@ -147,6 +147,13 @@ generate_history_table_migration: @echo "+\n++ Generating history table migration ...\n+" @docker compose $(DC_FILE) exec backend bash -c "flask generate_history_table_migration $(TABLE)" + +# Generates a migration file for the specified table +# Usage: make generate_migration TABLE= +generate_table_migration: + @echo "+\n++ Generating history table migration ...\n+" + @docker compose $(DC_FILE) exec backend bash -c "flask generate_table_migration $(TABLE)" + # initial project setup for local/codespaces development init: @./bin/setup_codespaces.sh diff --git a/migrations/sql/V2024.09.03.19.58__add_permit_extraction_task_table.sql b/migrations/sql/V2024.09.03.19.58__add_permit_extraction_task_table.sql new file mode 100644 index 0000000000..90605edabb --- /dev/null +++ b/migrations/sql/V2024.09.03.19.58__add_permit_extraction_task_table.sql @@ -0,0 +1,21 @@ +-- This file was generated by the generate_table_ddl command +-- The file contains the corresponding history table definition for the permit_extraction_task table +CREATE TABLE permit_extraction_task ( + create_user VARCHAR(60) NOT NULL, + create_timestamp TIMESTAMP WITHOUT TIME ZONE NOT NULL, + update_user VARCHAR(60) NOT NULL, + update_timestamp TIMESTAMP WITHOUT TIME ZONE NOT NULL, + permit_extraction_task_id UUID NOT NULL, + task_id VARCHAR(255) NOT NULL, + task_status VARCHAR(255) NOT NULL, + task_meta JSON, + task_result JSON, + core_status_task_id VARCHAR(255), + permit_amendment_guid UUID NOT NULL, + permit_amendment_document_guid UUID NOT NULL, + PRIMARY KEY (permit_extraction_task_id), + FOREIGN KEY(permit_amendment_guid) REFERENCES permit_amendment (permit_amendment_guid), + FOREIGN KEY(permit_amendment_document_guid) REFERENCES permit_amendment_document (permit_amendment_document_guid) +); +CREATE INDEX IF NOT EXISTS permit_extraction_task_id_idx ON permit_extraction_task (task_id); +CREATE INDEX IF NOT EXISTS permit_extraction_amend_guid_idx ON permit_extraction_task (permit_amendment_guid); \ No newline at end of file diff --git a/migrations/sql/V2024.09.03.20.58__add_permit_condition_step_column.sql b/migrations/sql/V2024.09.03.20.58__add_permit_condition_step_column.sql new file mode 100644 index 0000000000..b7127d9fa9 --- /dev/null +++ b/migrations/sql/V2024.09.03.20.58__add_permit_condition_step_column.sql @@ -0,0 +1 @@ +ALTER TABLE permit_conditions ADD COLUMN step VARCHAR(50); \ No newline at end of file diff --git a/migrations/sql/V2024.09.03.20.59__add_permit_condition_step_column_version.sql b/migrations/sql/V2024.09.03.20.59__add_permit_condition_step_column_version.sql new file mode 100644 index 0000000000..9fb7df4eb4 --- /dev/null +++ b/migrations/sql/V2024.09.03.20.59__add_permit_condition_step_column_version.sql @@ -0,0 +1 @@ +ALTER TABLE permit_conditions_version ADD COLUMN step VARCHAR(50); \ No newline at end of file diff --git a/services/common/src/components/common/ActionMenu.tsx b/services/common/src/components/common/ActionMenu.tsx index 9112214a61..d0eff8ceae 100644 --- a/services/common/src/components/common/ActionMenu.tsx +++ b/services/common/src/components/common/ActionMenu.tsx @@ -24,6 +24,7 @@ export const generateActionMenuItems = (actionItems: ITableAction[], record) => label: (