From 6bb4d80518c677f6a13d593ea966d3d5a76cd278 Mon Sep 17 00:00:00 2001 From: Mitch Oz Date: Fri, 6 Sep 2024 12:05:02 -0600 Subject: [PATCH 1/3] add rf 5 voter --- ...735645882369-AddGitcoin Passport Holder.js | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 db/migrations/1735645882369-AddGitcoin Passport Holder.js diff --git a/db/migrations/1735645882369-AddGitcoin Passport Holder.js b/db/migrations/1735645882369-AddGitcoin Passport Holder.js new file mode 100644 index 0000000..4d0ad31 --- /dev/null +++ b/db/migrations/1735645882369-AddGitcoin Passport Holder.js @@ -0,0 +1,29 @@ +module.exports = class AddGitcoinPassportHolder1735645882369 { + name = "AddGitcoinPassportHolder1735645882369"; + + async up(db) { + const SQUID_NETWORK = process.env.SQUID_NETWORK || "eth-sepolia"; + if (SQUID_NETWORK !== "optimism-mainnet") return; + // add organisation with name "Gitcoin Passport Holder" and schema id "0x6ab5d34260fca0cfcf0e76e96d439cace6aa7c3c019d7c4580ed52c6845e9c89" + await db.query( + `INSERT INTO "organisation" ("id", "name", "issuer", "color", "start_block") + VALUES ( + '0x6ab5d34260fca0cfcf0e76e96d439cace6aa7c3c019d7c4580ed52c6845e9c89', + 'Gitcoin Passport Holder', + '0x843829986e895facd330486a61ebee9e1f1adb1a', + '#00433b', + 108517456 + )` + ); + } + + async down(db) { + const SQUID_NETWORK = process.env.SQUID_NETWORK || "eth-sepolia"; + if (SQUID_NETWORK !== "optimism-mainnet") return; + // remove organisation with name "Gitcoin Passport Holder" and schema id "0x6ab5d34260fca0cfcf0e76e96d439cace6aa7c3c019d7c4580ed52c6845e9c89" + await db.query( + `DELETE FROM "organisation" WHERE "id" = '0x6ab5d34260fca0cfcf0e76e96d439cace6aa7c3c019d7c4580ed52c6845e9c89'` + ); + } +}; + \ No newline at end of file From dfc77dbd16be55852c0390e3fcfa45fab7296bc1 Mon Sep 17 00:00:00 2001 From: Mitch Oz Date: Fri, 6 Sep 2024 12:07:39 -0600 Subject: [PATCH 2/3] add rf 5 voter --- db/migrations/1735646045434-AddRF 5 Voter.js | 29 ++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 db/migrations/1735646045434-AddRF 5 Voter.js diff --git a/db/migrations/1735646045434-AddRF 5 Voter.js b/db/migrations/1735646045434-AddRF 5 Voter.js new file mode 100644 index 0000000..7427d1e --- /dev/null +++ b/db/migrations/1735646045434-AddRF 5 Voter.js @@ -0,0 +1,29 @@ +module.exports = class AddRF5Voter1735646045434 { + name = "AddRF5Voter1735646045434"; + + async up(db) { + const SQUID_NETWORK = process.env.SQUID_NETWORK || "eth-sepolia"; + if (SQUID_NETWORK !== "optimism-mainnet") return; + // add organisation with name "RF 5 Voter" and schema id "0x41513aa7b99bfea09d389c74aacedaeb13c28fb748569e9e2400109cbe284ee5" + await db.query( + `INSERT INTO "organisation" ("id", "name", "issuer", "color", "start_block") + VALUES ( + '0x41513aa7b99bfea09d389c74aacedaeb13c28fb748569e9e2400109cbe284ee5', + 'RF 5 Voter', + '0xe4553b743e74da3424ac51f8c1e586fd43ae226f', + '#ff0420', + 124930763 + )` + ); + } + + async down(db) { + const SQUID_NETWORK = process.env.SQUID_NETWORK || "eth-sepolia"; + if (SQUID_NETWORK !== "optimism-mainnet") return; + // remove organisation with name "RF 5 Voter" and schema id "0x41513aa7b99bfea09d389c74aacedaeb13c28fb748569e9e2400109cbe284ee5" + await db.query( + `DELETE FROM "organisation" WHERE "id" = '0x41513aa7b99bfea09d389c74aacedaeb13c28fb748569e9e2400109cbe284ee5'` + ); + } +}; + \ No newline at end of file From 02dc97c93d223ccca805b99c5abb684d30fd37df Mon Sep 17 00:00:00 2001 From: Mitch Oz Date: Fri, 6 Sep 2024 12:28:05 -0600 Subject: [PATCH 3/3] remove mistaken migration --- ...735645882369-AddGitcoin Passport Holder.js | 29 ------------------- 1 file changed, 29 deletions(-) delete mode 100644 db/migrations/1735645882369-AddGitcoin Passport Holder.js diff --git a/db/migrations/1735645882369-AddGitcoin Passport Holder.js b/db/migrations/1735645882369-AddGitcoin Passport Holder.js deleted file mode 100644 index 4d0ad31..0000000 --- a/db/migrations/1735645882369-AddGitcoin Passport Holder.js +++ /dev/null @@ -1,29 +0,0 @@ -module.exports = class AddGitcoinPassportHolder1735645882369 { - name = "AddGitcoinPassportHolder1735645882369"; - - async up(db) { - const SQUID_NETWORK = process.env.SQUID_NETWORK || "eth-sepolia"; - if (SQUID_NETWORK !== "optimism-mainnet") return; - // add organisation with name "Gitcoin Passport Holder" and schema id "0x6ab5d34260fca0cfcf0e76e96d439cace6aa7c3c019d7c4580ed52c6845e9c89" - await db.query( - `INSERT INTO "organisation" ("id", "name", "issuer", "color", "start_block") - VALUES ( - '0x6ab5d34260fca0cfcf0e76e96d439cace6aa7c3c019d7c4580ed52c6845e9c89', - 'Gitcoin Passport Holder', - '0x843829986e895facd330486a61ebee9e1f1adb1a', - '#00433b', - 108517456 - )` - ); - } - - async down(db) { - const SQUID_NETWORK = process.env.SQUID_NETWORK || "eth-sepolia"; - if (SQUID_NETWORK !== "optimism-mainnet") return; - // remove organisation with name "Gitcoin Passport Holder" and schema id "0x6ab5d34260fca0cfcf0e76e96d439cace6aa7c3c019d7c4580ed52c6845e9c89" - await db.query( - `DELETE FROM "organisation" WHERE "id" = '0x6ab5d34260fca0cfcf0e76e96d439cace6aa7c3c019d7c4580ed52c6845e9c89'` - ); - } -}; - \ No newline at end of file