From 05f17ea78ed586445ef18cf34b62e8775c950a96 Mon Sep 17 00:00:00 2001 From: Amin Latifi Date: Thu, 6 Jun 2024 11:47:01 +0330 Subject: [PATCH 1/2] Removed revoked attestations Change slug to url --- db/migrations/1715693415593-Data.js | 51 ------------------- db/migrations/1716207083370-Data.js | 13 ----- db/migrations/1717657836767-Data.js | 11 ---- db/migrations/1717658264897-Data.js | 21 -------- db/migrations/1717661742627-Data.js | 11 ++++ schema.graphql | 4 +- src/controllers/authorizeAttestation.ts | 4 +- .../projectVerificationAttestation.ts | 11 +--- .../import-projects/gitcoin/helpers.ts | 2 +- src/features/import-projects/helpers.ts | 6 +-- .../generated/attestorOrganisation.model.ts | 3 -- src/model/generated/project.model.ts | 2 +- .../generated/projectAttestation.model.ts | 3 -- 13 files changed, 19 insertions(+), 123 deletions(-) delete mode 100644 db/migrations/1715693415593-Data.js delete mode 100644 db/migrations/1716207083370-Data.js delete mode 100644 db/migrations/1717657836767-Data.js delete mode 100644 db/migrations/1717658264897-Data.js create mode 100644 db/migrations/1717661742627-Data.js diff --git a/db/migrations/1715693415593-Data.js b/db/migrations/1715693415593-Data.js deleted file mode 100644 index 64383ef..0000000 --- a/db/migrations/1715693415593-Data.js +++ /dev/null @@ -1,51 +0,0 @@ -module.exports = class Data1715693415593 { - name = 'Data1715693415593' - - async up(db) { - await db.query(`CREATE TABLE "attestor" ("id" character varying NOT NULL, CONSTRAINT "PK_2ba0dae296b9deebeb9ecbbf508" PRIMARY KEY ("id"))`) - await db.query(`CREATE TABLE "project" ("id" character varying NOT NULL, "source" text NOT NULL, "project_id" text NOT NULL, "title" text, "description" text, "total_vouches" integer NOT NULL, "total_flags" integer NOT NULL, "total_attests" integer NOT NULL, "last_updated_timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, CONSTRAINT "PK_4d68b1358bb5b766d3e78f32f57" PRIMARY KEY ("id"))`) - await db.query(`CREATE INDEX "IDX_399e8555e92ea7fd5f129fe178" ON "project" ("source") `) - await db.query(`CREATE INDEX "IDX_1a480c5734c5aacb9cef7b1499" ON "project" ("project_id") `) - await db.query(`CREATE TABLE "organisation_project" ("id" character varying NOT NULL, "vouch" boolean NOT NULL, "count" integer NOT NULL, "organisation_id" character varying, "project_id" character varying, CONSTRAINT "PK_4ee2279a4757fecde9a56f003f2" PRIMARY KEY ("id"))`) - await db.query(`CREATE INDEX "IDX_202ff9497fc7d9d0c3e7a74b17" ON "organisation_project" ("organisation_id") `) - await db.query(`CREATE INDEX "IDX_356298298d0613568b73c63a1f" ON "organisation_project" ("project_id") `) - await db.query(`CREATE TABLE "organisation" ("id" character varying NOT NULL, "name" text NOT NULL, "issuer" text NOT NULL, "color" text, CONSTRAINT "PK_c725ae234ef1b74cce43d2d00c1" PRIMARY KEY ("id"))`) - await db.query(`CREATE UNIQUE INDEX "IDX_d9428f9c8e3052d6617e3aab0e" ON "organisation" ("name") `) - await db.query(`CREATE TABLE "attestor_organisation" ("id" character varying NOT NULL, "attest_timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "revoked" boolean NOT NULL, "attestor_id" character varying, "organisation_id" character varying, CONSTRAINT "PK_ac02a8a577635d60275796a9d03" PRIMARY KEY ("id"))`) - await db.query(`CREATE INDEX "IDX_22cd09c4533533cebedb5487f4" ON "attestor_organisation" ("attestor_id") `) - await db.query(`CREATE INDEX "IDX_b0d947390c1e10152bb1387fa2" ON "attestor_organisation" ("organisation_id") `) - await db.query(`CREATE TABLE "project_attestation" ("id" character varying NOT NULL, "recipient" text NOT NULL, "vouch" boolean NOT NULL, "tx_hash" text NOT NULL, "revoked" boolean NOT NULL, "attest_timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "comment" text, "attestor_organisation_id" character varying, "project_id" character varying, CONSTRAINT "PK_b54887e7eb9193e705303c2b0a0" PRIMARY KEY ("id"))`) - await db.query(`CREATE INDEX "IDX_d482a5af31e29569b8b42d9252" ON "project_attestation" ("attestor_organisation_id") `) - await db.query(`CREATE INDEX "IDX_1082147528db937cb5b50fb2a0" ON "project_attestation" ("project_id") `) - await db.query(`ALTER TABLE "organisation_project" ADD CONSTRAINT "FK_202ff9497fc7d9d0c3e7a74b17f" FOREIGN KEY ("organisation_id") REFERENCES "organisation"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`) - await db.query(`ALTER TABLE "organisation_project" ADD CONSTRAINT "FK_356298298d0613568b73c63a1fc" FOREIGN KEY ("project_id") REFERENCES "project"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`) - await db.query(`ALTER TABLE "attestor_organisation" ADD CONSTRAINT "FK_22cd09c4533533cebedb5487f44" FOREIGN KEY ("attestor_id") REFERENCES "attestor"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`) - await db.query(`ALTER TABLE "attestor_organisation" ADD CONSTRAINT "FK_b0d947390c1e10152bb1387fa23" FOREIGN KEY ("organisation_id") REFERENCES "organisation"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`) - await db.query(`ALTER TABLE "project_attestation" ADD CONSTRAINT "FK_d482a5af31e29569b8b42d92525" FOREIGN KEY ("attestor_organisation_id") REFERENCES "attestor_organisation"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`) - await db.query(`ALTER TABLE "project_attestation" ADD CONSTRAINT "FK_1082147528db937cb5b50fb2a05" FOREIGN KEY ("project_id") REFERENCES "project"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`) - } - - async down(db) { - await db.query(`DROP TABLE "attestor"`) - await db.query(`DROP TABLE "project"`) - await db.query(`DROP INDEX "public"."IDX_399e8555e92ea7fd5f129fe178"`) - await db.query(`DROP INDEX "public"."IDX_1a480c5734c5aacb9cef7b1499"`) - await db.query(`DROP TABLE "organisation_project"`) - await db.query(`DROP INDEX "public"."IDX_202ff9497fc7d9d0c3e7a74b17"`) - await db.query(`DROP INDEX "public"."IDX_356298298d0613568b73c63a1f"`) - await db.query(`DROP TABLE "organisation"`) - await db.query(`DROP INDEX "public"."IDX_d9428f9c8e3052d6617e3aab0e"`) - await db.query(`DROP TABLE "attestor_organisation"`) - await db.query(`DROP INDEX "public"."IDX_22cd09c4533533cebedb5487f4"`) - await db.query(`DROP INDEX "public"."IDX_b0d947390c1e10152bb1387fa2"`) - await db.query(`DROP TABLE "project_attestation"`) - await db.query(`DROP INDEX "public"."IDX_d482a5af31e29569b8b42d9252"`) - await db.query(`DROP INDEX "public"."IDX_1082147528db937cb5b50fb2a0"`) - await db.query(`ALTER TABLE "organisation_project" DROP CONSTRAINT "FK_202ff9497fc7d9d0c3e7a74b17f"`) - await db.query(`ALTER TABLE "organisation_project" DROP CONSTRAINT "FK_356298298d0613568b73c63a1fc"`) - await db.query(`ALTER TABLE "attestor_organisation" DROP CONSTRAINT "FK_22cd09c4533533cebedb5487f44"`) - await db.query(`ALTER TABLE "attestor_organisation" DROP CONSTRAINT "FK_b0d947390c1e10152bb1387fa23"`) - await db.query(`ALTER TABLE "project_attestation" DROP CONSTRAINT "FK_d482a5af31e29569b8b42d92525"`) - await db.query(`ALTER TABLE "project_attestation" DROP CONSTRAINT "FK_1082147528db937cb5b50fb2a05"`) - } -} diff --git a/db/migrations/1716207083370-Data.js b/db/migrations/1716207083370-Data.js deleted file mode 100644 index 0fc1c3a..0000000 --- a/db/migrations/1716207083370-Data.js +++ /dev/null @@ -1,13 +0,0 @@ -module.exports = class Data1716207083370 { - name = 'Data1716207083370' - - async up(db) { - await db.query(`ALTER TABLE "project" ADD "slug" text`) - await db.query(`ALTER TABLE "project" ADD "image" text`) - } - - async down(db) { - await db.query(`ALTER TABLE "project" DROP COLUMN "slug"`) - await db.query(`ALTER TABLE "project" DROP COLUMN "image"`) - } -} diff --git a/db/migrations/1717657836767-Data.js b/db/migrations/1717657836767-Data.js deleted file mode 100644 index faa0de8..0000000 --- a/db/migrations/1717657836767-Data.js +++ /dev/null @@ -1,11 +0,0 @@ -module.exports = class Data1717657836767 { - name = 'Data1717657836767' - - async up(db) { - await db.query(`ALTER TABLE "project" ADD "imported" boolean`) - } - - async down(db) { - await db.query(`ALTER TABLE "project" DROP COLUMN "imported"`) - } -} diff --git a/db/migrations/1717658264897-Data.js b/db/migrations/1717658264897-Data.js deleted file mode 100644 index 46d79cd..0000000 --- a/db/migrations/1717658264897-Data.js +++ /dev/null @@ -1,21 +0,0 @@ -module.exports = class Data1717658264897 { - name = "Data1717658264897"; - - async up(db) { - // fill the new column with default values - await db.query(`UPDATE "project" SET "imported" = false`); - await db.query( - `ALTER TABLE "project" ALTER COLUMN "imported" SET NOT NULL` - ); - await db.query( - `CREATE INDEX "IDX_408502a376cb8a2d0eb8f94ad5" ON "project" ("imported") ` - ); - } - - async down(db) { - await db.query( - `ALTER TABLE "project" ALTER COLUMN "imported" DROP NOT NULL` - ); - await db.query(`DROP INDEX "public"."IDX_408502a376cb8a2d0eb8f94ad5"`); - } -}; diff --git a/db/migrations/1717661742627-Data.js b/db/migrations/1717661742627-Data.js new file mode 100644 index 0000000..bf002c6 --- /dev/null +++ b/db/migrations/1717661742627-Data.js @@ -0,0 +1,11 @@ +module.exports = class Data1717661742627 { + name = 'Data1717661742627' + + async up(db) { + await db.query(`ALTER TABLE "project" RENAME COLUMN "slug" TO "url"`) + } + + async down(db) { + await db.query(`ALTER TABLE "project" RENAME COLUMN "url" TO "slug"`) + } +} diff --git a/schema.graphql b/schema.graphql index 05212a0..38f5cc0 100644 --- a/schema.graphql +++ b/schema.graphql @@ -4,7 +4,6 @@ type ProjectAttestation @entity { recipient: String! vouch: Boolean! txHash: String! - revoked: Boolean! attestorOrganisation: AttestorOrganisation! project: Project! attestTimestamp: DateTime! @@ -18,7 +17,6 @@ type AttestorOrganisation @entity { organisation: Organisation! "Timestamp at which the relationship was created" attestTimestamp: DateTime! - revoked: Boolean! } type Attestor @entity { @@ -60,7 +58,7 @@ type Project @entity { "Total attests" totalAttests: Int! "Slug of the project" - slug: String + url: String "Image of the project" image: String "project data is imported from a source or not" diff --git a/src/controllers/authorizeAttestation.ts b/src/controllers/authorizeAttestation.ts index 0938ee9..1e69f9c 100644 --- a/src/controllers/authorizeAttestation.ts +++ b/src/controllers/authorizeAttestation.ts @@ -39,7 +39,6 @@ export const handleAuthorize = async ( id: key, attestor, organisation, - revoked: false, attestTimestamp: new Date(log.block.timestamp), }); @@ -66,7 +65,6 @@ export const handleAuthorizeRevoke = async ( return; } - attestation.revoked = true; - await ctx.store.upsert(attestation); + await ctx.store.remove(attestation); ctx.log.debug(`Revoked authorize attestation ${attestation}`); }; diff --git a/src/controllers/projectVerificationAttestation.ts b/src/controllers/projectVerificationAttestation.ts index b5ebfa1..41f8444 100644 --- a/src/controllers/projectVerificationAttestation.ts +++ b/src/controllers/projectVerificationAttestation.ts @@ -47,13 +47,6 @@ export const handleProjectAttestation = async ( return; } - if (attestorOrganisation.revoked) { - ctx.log.debug( - `Attestor ${issuer} authorization attestation ${refUID} is revoked from organisation ${attestorOrganisation.organisation.name}` - ); - return; - } - const { success, data: projectVerificationAttestation } = parseAttestationData(decodedData); @@ -93,7 +86,6 @@ export const handleProjectAttestation = async ( attestorOrganisation, comment, attestTimestamp: new Date(log.block.timestamp), - revoked: false, recipient, }); @@ -124,8 +116,7 @@ export const handleProjectAttestationRevoke = async ( return; } - attestation.revoked = true; - await ctx.store.upsert(attestation); + await ctx.store.remove(attestation); ctx.log.debug(`Revoked project attestation ${JSON.stringify(attestation)}`); await updateProjectAttestationCounts(ctx, attestation.project); diff --git a/src/features/import-projects/gitcoin/helpers.ts b/src/features/import-projects/gitcoin/helpers.ts index 4170f45..6a9ea68 100644 --- a/src/features/import-projects/gitcoin/helpers.ts +++ b/src/features/import-projects/gitcoin/helpers.ts @@ -30,7 +30,7 @@ export const processProjectsBatch = async ( id: project.id, title: project.name || project.metadata?.title, description: project.metadata?.description, - slug: generateGitcoinSlug(project), + url: generateGitcoinSlug(project), image: project.metadata?.bannerImg ? convertIpfsHashToHttps(project.metadata?.bannerImg) : "", diff --git a/src/features/import-projects/helpers.ts b/src/features/import-projects/helpers.ts index 3952d2c..35156e5 100644 --- a/src/features/import-projects/helpers.ts +++ b/src/features/import-projects/helpers.ts @@ -36,7 +36,7 @@ export const updateOrCreateProject = async ( const isUpdated = existingProject.title !== project[titleField] || existingProject.description !== project[descriptionField] || - existingProject.slug !== project[slugField] || + existingProject.url !== project[slugField] || existingProject.image !== project[imageField]; if (isUpdated) { @@ -45,7 +45,7 @@ export const updateOrCreateProject = async ( title: project[titleField], description: project[descriptionField], image: project[imageField], - slug: project[slugField], + url: project[slugField], lastUpdatedTimestamp: new Date(), imported: true, }); @@ -67,7 +67,7 @@ export const updateOrCreateProject = async ( title: project[titleField], description: project[descriptionField], image: project[imageField], - slug: project[slugField], + url: project[slugField], projectId: projectId, source: source, totalVouches: 0, diff --git a/src/model/generated/attestorOrganisation.model.ts b/src/model/generated/attestorOrganisation.model.ts index cfbcf13..5a448ec 100644 --- a/src/model/generated/attestorOrganisation.model.ts +++ b/src/model/generated/attestorOrganisation.model.ts @@ -27,7 +27,4 @@ export class AttestorOrganisation { */ @Column_("timestamp with time zone", {nullable: false}) attestTimestamp!: Date - - @Column_("bool", {nullable: false}) - revoked!: boolean } diff --git a/src/model/generated/project.model.ts b/src/model/generated/project.model.ts index eae6b27..0abce05 100644 --- a/src/model/generated/project.model.ts +++ b/src/model/generated/project.model.ts @@ -62,7 +62,7 @@ export class Project { * Slug of the project */ @Column_("text", {nullable: true}) - slug!: string | undefined | null + url!: string | undefined | null /** * Image of the project diff --git a/src/model/generated/projectAttestation.model.ts b/src/model/generated/projectAttestation.model.ts index 4750dd1..7641c3c 100644 --- a/src/model/generated/projectAttestation.model.ts +++ b/src/model/generated/projectAttestation.model.ts @@ -23,9 +23,6 @@ export class ProjectAttestation { @Column_("text", {nullable: false}) txHash!: string - @Column_("bool", {nullable: false}) - revoked!: boolean - @Index_() @ManyToOne_(() => AttestorOrganisation, {nullable: true}) attestorOrganisation!: AttestorOrganisation From 325b2d0eacb52b912d39b10e265ce73fe82df6b9 Mon Sep 17 00:00:00 2001 From: Amin Latifi Date: Thu, 6 Jun 2024 11:55:08 +0330 Subject: [PATCH 2/2] Updated migrations --- db/migrations/1717661742627-Data.js | 11 ------ db/migrations/1717662179474-Data.js | 53 +++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 11 deletions(-) delete mode 100644 db/migrations/1717661742627-Data.js create mode 100644 db/migrations/1717662179474-Data.js diff --git a/db/migrations/1717661742627-Data.js b/db/migrations/1717661742627-Data.js deleted file mode 100644 index bf002c6..0000000 --- a/db/migrations/1717661742627-Data.js +++ /dev/null @@ -1,11 +0,0 @@ -module.exports = class Data1717661742627 { - name = 'Data1717661742627' - - async up(db) { - await db.query(`ALTER TABLE "project" RENAME COLUMN "slug" TO "url"`) - } - - async down(db) { - await db.query(`ALTER TABLE "project" RENAME COLUMN "url" TO "slug"`) - } -} diff --git a/db/migrations/1717662179474-Data.js b/db/migrations/1717662179474-Data.js new file mode 100644 index 0000000..84441c5 --- /dev/null +++ b/db/migrations/1717662179474-Data.js @@ -0,0 +1,53 @@ +module.exports = class Data1717662179474 { + name = 'Data1717662179474' + + async up(db) { + await db.query(`CREATE TABLE "attestor" ("id" character varying NOT NULL, CONSTRAINT "PK_2ba0dae296b9deebeb9ecbbf508" PRIMARY KEY ("id"))`) + await db.query(`CREATE TABLE "project" ("id" character varying NOT NULL, "source" text NOT NULL, "project_id" text NOT NULL, "title" text, "description" text, "total_vouches" integer NOT NULL, "total_flags" integer NOT NULL, "total_attests" integer NOT NULL, "url" text, "image" text, "imported" boolean NOT NULL, "last_updated_timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, CONSTRAINT "PK_4d68b1358bb5b766d3e78f32f57" PRIMARY KEY ("id"))`) + await db.query(`CREATE INDEX "IDX_399e8555e92ea7fd5f129fe178" ON "project" ("source") `) + await db.query(`CREATE INDEX "IDX_1a480c5734c5aacb9cef7b1499" ON "project" ("project_id") `) + await db.query(`CREATE INDEX "IDX_408502a376cb8a2d0eb8f94ad5" ON "project" ("imported") `) + await db.query(`CREATE TABLE "organisation_project" ("id" character varying NOT NULL, "vouch" boolean NOT NULL, "count" integer NOT NULL, "organisation_id" character varying, "project_id" character varying, CONSTRAINT "PK_4ee2279a4757fecde9a56f003f2" PRIMARY KEY ("id"))`) + await db.query(`CREATE INDEX "IDX_202ff9497fc7d9d0c3e7a74b17" ON "organisation_project" ("organisation_id") `) + await db.query(`CREATE INDEX "IDX_356298298d0613568b73c63a1f" ON "organisation_project" ("project_id") `) + await db.query(`CREATE TABLE "organisation" ("id" character varying NOT NULL, "name" text NOT NULL, "issuer" text NOT NULL, "color" text, CONSTRAINT "PK_c725ae234ef1b74cce43d2d00c1" PRIMARY KEY ("id"))`) + await db.query(`CREATE UNIQUE INDEX "IDX_d9428f9c8e3052d6617e3aab0e" ON "organisation" ("name") `) + await db.query(`CREATE TABLE "attestor_organisation" ("id" character varying NOT NULL, "attest_timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "attestor_id" character varying, "organisation_id" character varying, CONSTRAINT "PK_ac02a8a577635d60275796a9d03" PRIMARY KEY ("id"))`) + await db.query(`CREATE INDEX "IDX_22cd09c4533533cebedb5487f4" ON "attestor_organisation" ("attestor_id") `) + await db.query(`CREATE INDEX "IDX_b0d947390c1e10152bb1387fa2" ON "attestor_organisation" ("organisation_id") `) + await db.query(`CREATE TABLE "project_attestation" ("id" character varying NOT NULL, "recipient" text NOT NULL, "vouch" boolean NOT NULL, "tx_hash" text NOT NULL, "attest_timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "comment" text, "attestor_organisation_id" character varying, "project_id" character varying, CONSTRAINT "PK_b54887e7eb9193e705303c2b0a0" PRIMARY KEY ("id"))`) + await db.query(`CREATE INDEX "IDX_d482a5af31e29569b8b42d9252" ON "project_attestation" ("attestor_organisation_id") `) + await db.query(`CREATE INDEX "IDX_1082147528db937cb5b50fb2a0" ON "project_attestation" ("project_id") `) + await db.query(`ALTER TABLE "organisation_project" ADD CONSTRAINT "FK_202ff9497fc7d9d0c3e7a74b17f" FOREIGN KEY ("organisation_id") REFERENCES "organisation"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`) + await db.query(`ALTER TABLE "organisation_project" ADD CONSTRAINT "FK_356298298d0613568b73c63a1fc" FOREIGN KEY ("project_id") REFERENCES "project"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`) + await db.query(`ALTER TABLE "attestor_organisation" ADD CONSTRAINT "FK_22cd09c4533533cebedb5487f44" FOREIGN KEY ("attestor_id") REFERENCES "attestor"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`) + await db.query(`ALTER TABLE "attestor_organisation" ADD CONSTRAINT "FK_b0d947390c1e10152bb1387fa23" FOREIGN KEY ("organisation_id") REFERENCES "organisation"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`) + await db.query(`ALTER TABLE "project_attestation" ADD CONSTRAINT "FK_d482a5af31e29569b8b42d92525" FOREIGN KEY ("attestor_organisation_id") REFERENCES "attestor_organisation"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`) + await db.query(`ALTER TABLE "project_attestation" ADD CONSTRAINT "FK_1082147528db937cb5b50fb2a05" FOREIGN KEY ("project_id") REFERENCES "project"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`) + } + + async down(db) { + await db.query(`DROP TABLE "attestor"`) + await db.query(`DROP TABLE "project"`) + await db.query(`DROP INDEX "public"."IDX_399e8555e92ea7fd5f129fe178"`) + await db.query(`DROP INDEX "public"."IDX_1a480c5734c5aacb9cef7b1499"`) + await db.query(`DROP INDEX "public"."IDX_408502a376cb8a2d0eb8f94ad5"`) + await db.query(`DROP TABLE "organisation_project"`) + await db.query(`DROP INDEX "public"."IDX_202ff9497fc7d9d0c3e7a74b17"`) + await db.query(`DROP INDEX "public"."IDX_356298298d0613568b73c63a1f"`) + await db.query(`DROP TABLE "organisation"`) + await db.query(`DROP INDEX "public"."IDX_d9428f9c8e3052d6617e3aab0e"`) + await db.query(`DROP TABLE "attestor_organisation"`) + await db.query(`DROP INDEX "public"."IDX_22cd09c4533533cebedb5487f4"`) + await db.query(`DROP INDEX "public"."IDX_b0d947390c1e10152bb1387fa2"`) + await db.query(`DROP TABLE "project_attestation"`) + await db.query(`DROP INDEX "public"."IDX_d482a5af31e29569b8b42d9252"`) + await db.query(`DROP INDEX "public"."IDX_1082147528db937cb5b50fb2a0"`) + await db.query(`ALTER TABLE "organisation_project" DROP CONSTRAINT "FK_202ff9497fc7d9d0c3e7a74b17f"`) + await db.query(`ALTER TABLE "organisation_project" DROP CONSTRAINT "FK_356298298d0613568b73c63a1fc"`) + await db.query(`ALTER TABLE "attestor_organisation" DROP CONSTRAINT "FK_22cd09c4533533cebedb5487f44"`) + await db.query(`ALTER TABLE "attestor_organisation" DROP CONSTRAINT "FK_b0d947390c1e10152bb1387fa23"`) + await db.query(`ALTER TABLE "project_attestation" DROP CONSTRAINT "FK_d482a5af31e29569b8b42d92525"`) + await db.query(`ALTER TABLE "project_attestation" DROP CONSTRAINT "FK_1082147528db937cb5b50fb2a05"`) + } +}