-- CreateTable CREATE TABLE "CustomerAddress" ( "id" SERIAL NOT NULL, "customerId" INTEGER NOT NULL, "recipientName" TEXT NOT NULL, "phone" TEXT NOT NULL, "addressLine" TEXT NOT NULL, "subdistrict" TEXT NOT NULL, "district" TEXT NOT NULL, "province" TEXT NOT NULL, "zipcode" TEXT NOT NULL, "isDefault" BOOLEAN NOT NULL DEFAULT false, "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, "updatedAt" TIMESTAMP(3) NOT NULL, CONSTRAINT "CustomerAddress_pkey" PRIMARY KEY ("id") ); -- AddForeignKey ALTER TABLE "CustomerAddress" ADD CONSTRAINT "CustomerAddress_customerId_fkey" FOREIGN KEY ("customerId") REFERENCES "Customer"("id") ON DELETE CASCADE ON UPDATE CASCADE;