Skip to content

Commit

Permalink
Merge pull request #73 from Giveth/develop
Browse files Browse the repository at this point in the history
Test deploy to main
  • Loading branch information
aminlatifi authored Jun 9, 2024
2 parents e9e887c + e9e2b1e commit 9b5db5f
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 9 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@

# Backup file
.env.backup

# Exclude add-organisation updates on pushes
add-organisation.js
10 changes: 1 addition & 9 deletions add-organisation.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,14 @@
const createOrganisationAddMigration =
require("./db/create-organisation-add-migration").default;

<<<<<<< add-gitcoin-passport
const ORGANISATION_NAME = "Gitcoin Passport Holder"; // Replace with your own organisation name
const SCHEMA_ID =
"0x110c216190edf1c2cab264505c0b83437f0caa50298f371ad91a87394d9c55b2"; // Replace with your own schema id
const AUTHORIZED_ATTESTOR = "0x843829986e895facd330486a61Ebee9E1f1adB1a";
const COLOR = "#00433b";
=======
const ORGANISATION_NAME = "Pizza Lovers"; // Replace with your own organisation name
const SCHEMA_ID =
"0x9224f06bd11d0076dbcb28e4f0c654d78cb071930653510360a3a00518ad1710"; // Replace with your own schema id
const AUTHORIZED_ATTESTOR = "0x826976d7C600d45FB8287CA1d7c76FC8eb732030";
const COLOR = "#db284a";
>>>>>>> develop
// staging: eth-sepolia
// production: optimism-mainnet
const network = "optimism-mainnet";
const network = "eth-sepolia";

function main() {
createOrganisationAddMigration(
Expand Down
28 changes: 28 additions & 0 deletions db/migrations/1727705021366-AddHonorary Mexican.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
module.exports = class AddHonoraryMexican1727705021366 {
name = "AddHonoraryMexican1727705021366";

async up(db) {
const SQUID_NETWORK = process.env.SQUID_NETWORK || "eth-sepolia";
if (SQUID_NETWORK !== "eth-sepolia") return;
// add organisation with name "Honorary Mexican" and schema id "0xc80d5c0209976a6c994aa6dc3680f4ad2de2dbc1aa9f46164c251ad9e5e10e09"
await db.query(
`INSERT INTO "organisation" ("id", "name", "issuer", "color")
VALUES (
'0xc80d5c0209976a6c994aa6dc3680f4ad2de2dbc1aa9f46164c251ad9e5e10e09',
'Honorary Mexican',
'0x826976d7c600d45fb8287ca1d7c76fc8eb732030',
'#ff0022'
)`
);
}

async down(db) {
const SQUID_NETWORK = process.env.SQUID_NETWORK || "eth-sepolia";
if (SQUID_NETWORK !== "eth-sepolia") return;
// remove organisation with name "Honorary Mexican" and schema id "0xc80d5c0209976a6c994aa6dc3680f4ad2de2dbc1aa9f46164c251ad9e5e10e09"
await db.query(
`DELETE FROM "organisation" WHERE "id" = '0xc80d5c0209976a6c994aa6dc3680f4ad2de2dbc1aa9f46164c251ad9e5e10e09'`
);
}
};

28 changes: 28 additions & 0 deletions db/migrations/1727705168214-AddDegen.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
module.exports = class AddDegen1727705168214 {
name = "AddDegen1727705168214";

async up(db) {
const SQUID_NETWORK = process.env.SQUID_NETWORK || "eth-sepolia";
if (SQUID_NETWORK !== "eth-sepolia") return;
// add organisation with name "Degen" and schema id "0xa8122bdee6c8949308c097c2b28ab3d154bf4f27bf5a1e850a91884498b7de8c"
await db.query(
`INSERT INTO "organisation" ("id", "name", "issuer", "color")
VALUES (
'0xa8122bdee6c8949308c097c2b28ab3d154bf4f27bf5a1e850a91884498b7de8c',
'Degen',
'0x826976d7c600d45fb8287ca1d7c76fc8eb732030',
'#fff3c4'
)`
);
}

async down(db) {
const SQUID_NETWORK = process.env.SQUID_NETWORK || "eth-sepolia";
if (SQUID_NETWORK !== "eth-sepolia") return;
// remove organisation with name "Degen" and schema id "0xa8122bdee6c8949308c097c2b28ab3d154bf4f27bf5a1e850a91884498b7de8c"
await db.query(
`DELETE FROM "organisation" WHERE "id" = '0xa8122bdee6c8949308c097c2b28ab3d154bf4f27bf5a1e850a91884498b7de8c'`
);
}
};

0 comments on commit 9b5db5f

Please sign in to comment.