/*
  Warnings:

  - You are about to drop the column `barcode` on the `products` table. All the data in the column will be lost.
  - You are about to drop the column `brand` on the `products` table. All the data in the column will be lost.
  - You are about to drop the column `comparePrice` on the `products` table. All the data in the column will be lost.
  - You are about to drop the column `condition` on the `products` table. All the data in the column will be lost.
  - You are about to drop the column `costPrice` on the `products` table. All the data in the column will be lost.
  - You are about to drop the column `dimensions` on the `products` table. All the data in the column will be lost.
  - You are about to drop the column `images` on the `products` table. All the data in the column will be lost.
  - You are about to drop the column `isDigital` on the `products` table. All the data in the column will be lost.
  - You are about to drop the column `isFeatured` on the `products` table. All the data in the column will be lost.
  - You are about to drop the column `isPrime` on the `products` table. All the data in the column will be lost.
  - You are about to drop the column `lowStockAlert` on the `products` table. All the data in the column will be lost.
  - You are about to drop the column `manufacturer` on the `products` table. All the data in the column will be lost.
  - You are about to drop the column `model` on the `products` table. All the data in the column will be lost.
  - You are about to drop the column `rating` on the `products` table. All the data in the column will be lost.
  - You are about to drop the column `reviewCount` on the `products` table. All the data in the column will be lost.
  - You are about to drop the column `sellerId` on the `products` table. All the data in the column will be lost.
  - You are about to drop the column `sellerName` on the `products` table. All the data in the column will be lost.
  - You are about to drop the column `shortDesc` on the `products` table. All the data in the column will be lost.
  - You are about to drop the column `sku` on the `products` table. All the data in the column will be lost.
  - You are about to drop the column `slug` on the `products` table. All the data in the column will be lost.
  - You are about to drop the column `stock` on the `products` table. All the data in the column will be lost.
  - You are about to drop the column `tags` on the `products` table. All the data in the column will be lost.
  - You are about to drop the column `thumbnail` on the `products` table. All the data in the column will be lost.
  - You are about to drop the column `warrantyMonths` on the `products` table. All the data in the column will be lost.
  - You are about to drop the column `weight` on the `products` table. All the data in the column will be lost.
  - You are about to drop the `_ProductToSubcategory` table. If the table is not empty, all the data it contains will be lost.
  - A unique constraint covering the columns `[voiceXId]` on the table `products` will be added. If there are existing duplicate values, this will fail.

*/
-- DropForeignKey
ALTER TABLE "_ProductToSubcategory" DROP CONSTRAINT "_ProductToSubcategory_A_fkey";

-- DropForeignKey
ALTER TABLE "_ProductToSubcategory" DROP CONSTRAINT "_ProductToSubcategory_B_fkey";

-- DropIndex
DROP INDEX "products_brand_idx";

-- DropIndex
DROP INDEX "products_sku_key";

-- DropIndex
DROP INDEX "products_slug_key";

-- AlterTable
ALTER TABLE "products" DROP COLUMN "barcode",
DROP COLUMN "brand",
DROP COLUMN "comparePrice",
DROP COLUMN "condition",
DROP COLUMN "costPrice",
DROP COLUMN "dimensions",
DROP COLUMN "images",
DROP COLUMN "isDigital",
DROP COLUMN "isFeatured",
DROP COLUMN "isPrime",
DROP COLUMN "lowStockAlert",
DROP COLUMN "manufacturer",
DROP COLUMN "model",
DROP COLUMN "rating",
DROP COLUMN "reviewCount",
DROP COLUMN "sellerId",
DROP COLUMN "sellerName",
DROP COLUMN "shortDesc",
DROP COLUMN "sku",
DROP COLUMN "slug",
DROP COLUMN "stock",
DROP COLUMN "tags",
DROP COLUMN "thumbnail",
DROP COLUMN "warrantyMonths",
DROP COLUMN "weight",
ADD COLUMN     "amazonPrice" DECIMAL(10,2),
ADD COLUMN     "customDescription" TEXT,
ADD COLUMN     "customName" TEXT,
ADD COLUMN     "deletedAt" TIMESTAMP(3),
ADD COLUMN     "priceOverride" DECIMAL(10,2),
ADD COLUMN     "voiceXId" TEXT;

-- DropTable
DROP TABLE "_ProductToSubcategory";

-- DropEnum
DROP TYPE "ProductCondition";

-- CreateIndex
CREATE UNIQUE INDEX "products_voiceXId_key" ON "products"("voiceXId");

-- CreateIndex
CREATE INDEX "products_voiceXId_idx" ON "products"("voiceXId");

-- CreateIndex
CREATE INDEX "products_deletedAt_idx" ON "products"("deletedAt");
