From 03b94a91f8667c78b70efaeea0ce943b08799f72 Mon Sep 17 00:00:00 2001 From: Cherik Date: Mon, 28 Oct 2024 18:06:54 +0330 Subject: [PATCH] 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'; + `); + } +};