/*
  Warnings:

  - You are about to drop the column `addressLine1` on the `orders` table. All the data in the column will be lost.
  - You are about to drop the column `addressLine2` on the `orders` table. All the data in the column will be lost.
  - You are about to drop the column `carrier` on the `orders` table. All the data in the column will be lost.
  - You are about to drop the column `city` on the `orders` table. All the data in the column will be lost.
  - You are about to drop the column `country` on the `orders` table. All the data in the column will be lost.
  - You are about to drop the column `customerNote` on the `orders` table. All the data in the column will be lost.
  - You are about to drop the column `deliveredAt` on the `orders` table. All the data in the column will be lost.
  - You are about to drop the column `discount` on the `orders` table. All the data in the column will be lost.
  - You are about to drop the column `estimatedDelivery` on the `orders` table. All the data in the column will be lost.
  - You are about to drop the column `internalNote` on the `orders` table. All the data in the column will be lost.
  - You are about to drop the column `orderNumber` on the `orders` table. All the data in the column will be lost.
  - You are about to drop the column `paymentMethod` on the `orders` table. All the data in the column will be lost.
  - You are about to drop the column `paymentStatus` on the `orders` table. All the data in the column will be lost.
  - You are about to drop the column `postalCode` on the `orders` table. All the data in the column will be lost.
  - You are about to drop the column `shippingEmail` on the `orders` table. All the data in the column will be lost.
  - You are about to drop the column `shippingFee` on the `orders` table. All the data in the column will be lost.
  - You are about to drop the column `shippingName` on the `orders` table. All the data in the column will be lost.
  - You are about to drop the column `shippingPhone` on the `orders` table. All the data in the column will be lost.
  - You are about to drop the column `state` on the `orders` table. All the data in the column will be lost.
  - You are about to drop the column `subtotal` on the `orders` table. All the data in the column will be lost.
  - You are about to drop the column `tax` on the `orders` table. All the data in the column will be lost.
  - You are about to drop the column `total` on the `orders` table. All the data in the column will be lost.
  - You are about to drop the column `trackingNumber` on the `orders` table. All the data in the column will be lost.
  - A unique constraint covering the columns `[amazonOrderId]` on the table `orders` will be added. If there are existing duplicate values, this will fail.
  - Added the required column `amazonOrderId` to the `orders` table without a default value. This is not possible if the table is not empty.
  - Added the required column `subTotal` to the `orders` table without a default value. This is not possible if the table is not empty.

*/
-- DropIndex
DROP INDEX "orders_orderNumber_idx";

-- DropIndex
DROP INDEX "orders_orderNumber_key";

-- AlterTable
ALTER TABLE "orders" DROP COLUMN "addressLine1",
DROP COLUMN "addressLine2",
DROP COLUMN "carrier",
DROP COLUMN "city",
DROP COLUMN "country",
DROP COLUMN "customerNote",
DROP COLUMN "deliveredAt",
DROP COLUMN "discount",
DROP COLUMN "estimatedDelivery",
DROP COLUMN "internalNote",
DROP COLUMN "orderNumber",
DROP COLUMN "paymentMethod",
DROP COLUMN "paymentStatus",
DROP COLUMN "postalCode",
DROP COLUMN "shippingEmail",
DROP COLUMN "shippingFee",
DROP COLUMN "shippingName",
DROP COLUMN "shippingPhone",
DROP COLUMN "state",
DROP COLUMN "subtotal",
DROP COLUMN "tax",
DROP COLUMN "total",
DROP COLUMN "trackingNumber",
ADD COLUMN     "amazonOrderId" TEXT NOT NULL,
ADD COLUMN     "subTotal" DECIMAL(10,2) NOT NULL;

-- DropEnum
DROP TYPE "PaymentMethod";

-- DropEnum
DROP TYPE "PaymentStatus";

-- CreateIndex
CREATE UNIQUE INDEX "orders_amazonOrderId_key" ON "orders"("amazonOrderId");
