chore: V2 core loader + modules integration-tests (#6544)

This commit is contained in:
Oli Juhl
2024-02-29 16:46:30 +01:00
committed by GitHub
parent dc025302a1
commit 296d7faad4
100 changed files with 318 additions and 78 deletions
@@ -15,19 +15,15 @@ CREATE TABLE IF NOT EXISTS "region" (
"deleted_at" timestamptz NULL,
CONSTRAINT "region_pkey" PRIMARY KEY ("id")
);
-- Adjust "region" table
ALTER TABLE "region" DROP CONSTRAINT IF EXISTS "FK_3bdd5896ec93be2f1c62a3309a5";
ALTER TABLE "region" DROP CONSTRAINT IF EXISTS "FK_91f88052197680f9790272aaf5b";
${generatePostgresAlterColummnIfExistStatement(
"region",
["tax_rate", "gift_cards_taxable", "automatic_taxes", "includes_tax"],
"DROP NOT NULL"
)}
CREATE INDEX IF NOT EXISTS "IDX_region_deleted_at" ON "region" ("deleted_at") WHERE "deleted_at" IS NOT NULL;
-- Create or update "region_country" table
CREATE TABLE IF NOT EXISTS "region_country" (
"id" text NOT NULL,
@@ -40,7 +36,6 @@ CREATE TABLE IF NOT EXISTS "region_country" (
CONSTRAINT "region_country_pkey" PRIMARY KEY ("id")
);
CREATE UNIQUE INDEX IF NOT EXISTS "IDX_region_country_region_id_iso_2_unique" ON "region_country" (region_id, iso_2);
-- Adjust foreign keys for "region_country"
ALTER TABLE "region_country" DROP CONSTRAINT IF EXISTS "FK_91f88052197680f9790272aaf5b";
ALTER TABLE "region_country" ADD CONSTRAINT "region_country_region_id_foreign" FOREIGN KEY ("region_id") REFERENCES "region" ("id") ON UPDATE CASCADE;