text: -- AlterTable
  ALTER TABLE "User" ADD COLUMN     "metadata" JSONB;
  
  -- CreateTable
  CREATE TABLE "City" (
      "id" TEXT NOT NULL,
      "name" TEXT NOT NULL,
      "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
      "updatedAt" TIMESTAMP(3) NOT NULL,
      "deletedAt" TIMESTAMP(3),
  
      CONSTRAINT "City_pkey" PRIMARY KEY ("id")
  );
  
  -- CreateTable
  CREATE TABLE "Country" (
      "id" TEXT NOT NULL,
      "iso" TEXT NOT NULL,
      "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
      "updatedAt" TIMESTAMP(3) NOT NULL,
      "deletedAt" TIMESTAMP(3),
  
      CONSTRAINT "Country_pkey" PRIMARY KEY ("id")
  );
  
  -- CreateTable
  CREATE TABLE "Address" (
      "id" TEXT NOT NULL,
      "name" TEXT NOT NULL,
      "street" TEXT NOT NULL,
      "number" TEXT NOT NULL,
      "apartment" TEXT NOT NULL,
      "postalCode" TEXT NOT NULL,
      "latitude" DOUBLE PRECISION,
      "longitude" DOUBLE PRECISION,
      "cityId" TEXT NOT NULL,
      "countryId" TEXT NOT NULL,
      "userId" TEXT NOT NULL,
      "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
      "updatedAt" TIMESTAMP(3) NOT NULL,
      "deletedAt" TIMESTAMP(3),
      "metadata" JSONB,
  
      CONSTRAINT "Address_pkey" PRIMARY KEY ("id")
  );
  
  -- CreateTable
  CREATE TABLE "Category" (
      "id" TEXT NOT NULL,
      "slug" TEXT NOT NULL,
      "name" TEXT NOT NULL,
      "description" TEXT,
      "parentId" TEXT,
      "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
      "updatedAt" TIMESTAMP(3) NOT NULL,
      "deletedAt" TIMESTAMP(3),
      "metadata" JSONB,
  
      CONSTRAINT "Category_pkey" PRIMARY KEY ("id")
  );
  
  -- CreateTable
  CREATE TABLE "Product" (
      "id" TEXT NOT NULL,
      "name" TEXT NOT NULL,
      "slug" TEXT NOT NULL,
      "sku" TEXT,
      "description" TEXT,
      "price" DOUBLE PRECISION NOT NULL,
      "inventory" INTEGER,
      "isActive" BOOLEAN NOT NULL DEFAULT false,
      "sortOrder" INTEGER,
      "categoryId" TEXT,
      "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
      "updatedAt" TIMESTAMP(3) NOT NULL,
      "deletedAt" TIMESTAMP(3),
      "metadata" JSONB,
  
      CONSTRAINT "Product_pkey" PRIMARY KEY ("id")
  );
  
  -- CreateTable
  CREATE TABLE "Variant" (
      "id" TEXT NOT NULL,
      "name" TEXT NOT NULL,
      "sku" TEXT,
      "price" DOUBLE PRECISION,
      "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
      "updatedAt" TIMESTAMP(3) NOT NULL,
      "deletedAt" TIMESTAMP(3),
      "metadata" JSONB,
  
      CONSTRAINT "Variant_pkey" PRIMARY KEY ("id")
  );
  
  -- CreateTable
  CREATE TABLE "OptionsOnVariant" (
      "variantId" TEXT NOT NULL,
      "optionId" TEXT NOT NULL,
      "assignedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
  
      CONSTRAINT "OptionsOnVariant_pkey" PRIMARY KEY ("variantId","optionId")
  );
  
  -- CreateTable
  CREATE TABLE "OptionGroup" (
      "id" TEXT NOT NULL,
      "name" TEXT NOT NULL,
      "isActive" BOOLEAN NOT NULL DEFAULT false,
      "productId" TEXT NOT NULL,
      "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
      "updatedAt" TIMESTAMP(3) NOT NULL,
      "deletedAt" TIMESTAMP(3),
      "metadata" JSONB,
  
      CONSTRAINT "OptionGroup_pkey" PRIMARY KEY ("id")
  );
  
  -- CreateTable
  CREATE TABLE "Option" (
      "id" TEXT NOT NULL,
      "name" TEXT NOT NULL,
      "price" DOUBLE PRECISION NOT NULL,
      "isActive" BOOLEAN NOT NULL DEFAULT false,
      "optionGroupId" TEXT NOT NULL,
      "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
      "updatedAt" TIMESTAMP(3) NOT NULL,
      "deletedAt" TIMESTAMP(3),
      "metadata" JSONB,
  
      CONSTRAINT "Option_pkey" PRIMARY KEY ("id")
  );
  
  -- CreateTable
  CREATE TABLE "_OptionToOptionGroup" (
      "A" TEXT NOT NULL,
      "B" TEXT NOT NULL
  );
  
  -- CreateIndex
  CREATE UNIQUE INDEX "_OptionToOptionGroup_AB_unique" ON "_OptionToOptionGroup"("A", "B");
  
  -- CreateIndex
  CREATE INDEX "_OptionToOptionGroup_B_index" ON "_OptionToOptionGroup"("B");
  
  -- AddForeignKey
  ALTER TABLE "Address" ADD CONSTRAINT "Address_cityId_fkey" FOREIGN KEY ("cityId") REFERENCES "City"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
  
  -- AddForeignKey
  ALTER TABLE "Address" ADD CONSTRAINT "Address_countryId_fkey" FOREIGN KEY ("countryId") REFERENCES "Country"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
  
  -- AddForeignKey
  ALTER TABLE "Address" ADD CONSTRAINT "Address_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
  
  -- AddForeignKey
  ALTER TABLE "Category" ADD CONSTRAINT "Category_parentId_fkey" FOREIGN KEY ("parentId") REFERENCES "Category"("id") ON DELETE SET NULL ON UPDATE CASCADE;
  
  -- AddForeignKey
  ALTER TABLE "Product" ADD CONSTRAINT "Product_categoryId_fkey" FOREIGN KEY ("categoryId") REFERENCES "Category"("id") ON DELETE SET NULL ON UPDATE CASCADE;
  
  -- AddForeignKey
  ALTER TABLE "OptionsOnVariant" ADD CONSTRAINT "OptionsOnVariant_variantId_fkey" FOREIGN KEY ("variantId") REFERENCES "Variant"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
  
  -- AddForeignKey
  ALTER TABLE "OptionsOnVariant" ADD CONSTRAINT "OptionsOnVariant_optionId_fkey" FOREIGN KEY ("optionId") REFERENCES "Option"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
  
  -- AddForeignKey
  ALTER TABLE "OptionGroup" ADD CONSTRAINT "OptionGroup_productId_fkey" FOREIGN KEY ("productId") REFERENCES "Product"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
  
  -- AddForeignKey
  ALTER TABLE "_OptionToOptionGroup" ADD FOREIGN KEY ("A") REFERENCES "Option"("id") ON DELETE CASCADE ON UPDATE CASCADE;
  
  -- AddForeignKey
  ALTER TABLE "_OptionToOptionGroup" ADD FOREIGN KEY ("B") REFERENCES "OptionGroup"("id") ON DELETE CASCADE ON UPDATE CASCADE;
  