Skip to content

Commit

Permalink
add proof of regen example
Browse files Browse the repository at this point in the history
  • Loading branch information
divine-comedian committed Dec 9, 2024
1 parent 8fb7585 commit 65cb3cc
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions db/migrations/1743772119156-AddProof of Regen.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
module.exports = class AddProofofRegen1743772119156 {
name = "AddProofofRegen1743772119156";

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

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

0 comments on commit 65cb3cc

Please sign in to comment.