From 03b94a91f8667c78b70efaeea0ce943b08799f72 Mon Sep 17 00:00:00 2001 From: Cherik Date: Mon, 28 Oct 2024 18:06:54 +0330 Subject: [PATCH 1/2] add change rf5 migration --- ...1730125554407-ChangeRF5OrganizationName.js | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 db/migrations/1730125554407-ChangeRF5OrganizationName.js diff --git a/db/migrations/1730125554407-ChangeRF5OrganizationName.js b/db/migrations/1730125554407-ChangeRF5OrganizationName.js new file mode 100644 index 0000000..122d16d --- /dev/null +++ b/db/migrations/1730125554407-ChangeRF5OrganizationName.js @@ -0,0 +1,23 @@ +module.exports = class ChangeRF5OrganizationName1730125554407 { + name = "ChangeRF5OrganizationName1730125554407"; + + async up(db) { + // Update the organisation name from 'RF 5 Voter' to ''RF 5 or 6 Voter' for the specific ID + await db.query(` + UPDATE "organisation" + SET "name" = 'RF 5 or 6 Voter' + WHERE "id" = '0x41513aa7b99bfea09d389c74aacedaeb13c28fb748569e9e2400109cbe284ee5' + AND "name" = 'RF 5 Voter'; + `); + } + + async down(db) { + // Revert the organisation name from ''RF 5 or 6 Voter' back to 'RF 5 Voter' for the specific ID + await db.query(` + UPDATE "organisation" + SET "name" = 'RF 5 Voter' + WHERE "id" = '0x41513aa7b99bfea09d389c74aacedaeb13c28fb748569e9e2400109cbe284ee5' + AND "name" = ''RF 5 or 6 Voter'; + `); + } +}; From d0eb4fc2c12aa153b860065b886bb42ccd9f5b7d Mon Sep 17 00:00:00 2001 From: Cherik Date: Mon, 28 Oct 2024 18:08:21 +0330 Subject: [PATCH 2/2] fix typo --- db/migrations/1730125554407-ChangeRF5OrganizationName.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/db/migrations/1730125554407-ChangeRF5OrganizationName.js b/db/migrations/1730125554407-ChangeRF5OrganizationName.js index 122d16d..8a90bff 100644 --- a/db/migrations/1730125554407-ChangeRF5OrganizationName.js +++ b/db/migrations/1730125554407-ChangeRF5OrganizationName.js @@ -2,7 +2,7 @@ module.exports = class ChangeRF5OrganizationName1730125554407 { name = "ChangeRF5OrganizationName1730125554407"; async up(db) { - // Update the organisation name from 'RF 5 Voter' to ''RF 5 or 6 Voter' for the specific ID + // Update the organisation name from 'RF 5 Voter' to 'RF 5 or 6 Voter' for the specific ID await db.query(` UPDATE "organisation" SET "name" = 'RF 5 or 6 Voter' @@ -12,12 +12,12 @@ module.exports = class ChangeRF5OrganizationName1730125554407 { } async down(db) { - // Revert the organisation name from ''RF 5 or 6 Voter' back to 'RF 5 Voter' for the specific ID + // Revert the organisation name from 'RF 5 or 6 Voter' back to 'RF 5 Voter' for the specific ID await db.query(` UPDATE "organisation" SET "name" = 'RF 5 Voter' WHERE "id" = '0x41513aa7b99bfea09d389c74aacedaeb13c28fb748569e9e2400109cbe284ee5' - AND "name" = ''RF 5 or 6 Voter'; + AND "name" = 'RF 5 or 6 Voter'; `); } };