From ff63392289a870192f972eda9e1cd41b45c284e1 Mon Sep 17 00:00:00 2001 From: mari <2312138+masimons@users.noreply.github.com> Date: Wed, 16 Oct 2024 17:53:28 -0300 Subject: [PATCH] Add forecasted columns to grants table (#3269) * Add forecasted columns to grants table * wip * remove estimated_open_date --------- Co-authored-by: Laurie Reynolds --- ...220727_add_forecasted_columns_to_grants.js | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 packages/server/migrations/20240902220727_add_forecasted_columns_to_grants.js diff --git a/packages/server/migrations/20240902220727_add_forecasted_columns_to_grants.js b/packages/server/migrations/20240902220727_add_forecasted_columns_to_grants.js new file mode 100644 index 000000000..35e7e3336 --- /dev/null +++ b/packages/server/migrations/20240902220727_add_forecasted_columns_to_grants.js @@ -0,0 +1,27 @@ +/** + * @param { import("knex").Knex } knex + * @returns { Promise } + */ +exports.up = function (knex) { + return knex.schema.alterTable('grants', (table) => { + table.date('award_date'); + table.date('forecast_creation_date'); + table.date('fiscal_year'); + table.text('grantor_contact_name'); + table.text('grantor_contact_phone_number'); + }); +}; + +/** + * @param { import("knex").Knex } knex + * @returns { Promise } + */ +exports.down = function (knex) { + return knex.schema.table('grants', (table) => { + table.dropColumn('award_date'); + table.dropColumn('forecast_creation_date'); + table.dropColumn('fiscal_year'); + table.dropColumn('grantor_contact_name'); + table.dropColumn('grantor_contact_phone_number'); + }); +};