Skip to content

Commit

Permalink
add change rf5 migration
Browse files Browse the repository at this point in the history
  • Loading branch information
MohammadPCh committed Oct 28, 2024
1 parent 0481f44 commit 03b94a9
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions db/migrations/1730125554407-ChangeRF5OrganizationName.js
Original file line number Diff line number Diff line change
@@ -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';
`);
}
};

0 comments on commit 03b94a9

Please sign in to comment.