diff --git a/sources/packages/backend/apps/db-migrations/src/migrations/1734984637510-AddApplicationCancelDateSFASPartTimeApplications.ts b/sources/packages/backend/apps/db-migrations/src/migrations/1734984637510-AddApplicationCancelDateSFASPartTimeApplications.ts new file mode 100644 index 0000000000..327996228a --- /dev/null +++ b/sources/packages/backend/apps/db-migrations/src/migrations/1734984637510-AddApplicationCancelDateSFASPartTimeApplications.ts @@ -0,0 +1,24 @@ +import { MigrationInterface, QueryRunner } from "typeorm"; +import { getSQLFileData } from "../utilities/sqlLoader"; + +export class AddApplicationCancelDateSFASPartTimeApplications1734984637510 + implements MigrationInterface +{ + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query( + getSQLFileData( + "Add-application-cancel-date.sql", + "SFASPartTimeApplications", + ), + ); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query( + getSQLFileData( + "Rollback-add-application-cancel-date.sql", + "SFASPartTimeApplications", + ), + ); + } +} diff --git a/sources/packages/backend/apps/db-migrations/src/sql/SFASPartTimeApplications/Add-application-cancel-date.sql b/sources/packages/backend/apps/db-migrations/src/sql/SFASPartTimeApplications/Add-application-cancel-date.sql new file mode 100644 index 0000000000..0b0547a708 --- /dev/null +++ b/sources/packages/backend/apps/db-migrations/src/sql/SFASPartTimeApplications/Add-application-cancel-date.sql @@ -0,0 +1,6 @@ +ALTER TABLE + sims.sfas_part_time_applications +ADD + COLUMN application_cancel_date DATE; + +COMMENT ON COLUMN sims.sfas_part_time_applications.application_cancel_date IS 'Date that this application was cancelled (sail_application_events.event_date).'; \ No newline at end of file diff --git a/sources/packages/backend/apps/db-migrations/src/sql/SFASPartTimeApplications/Rollback-add-application-cancel-date.sql b/sources/packages/backend/apps/db-migrations/src/sql/SFASPartTimeApplications/Rollback-add-application-cancel-date.sql new file mode 100644 index 0000000000..065fd6f6ae --- /dev/null +++ b/sources/packages/backend/apps/db-migrations/src/sql/SFASPartTimeApplications/Rollback-add-application-cancel-date.sql @@ -0,0 +1,2 @@ +ALTER TABLE + sims.sfas_part_time_applications DROP COLUMN application_cancel_date; \ No newline at end of file