/*
  Warnings:

  - The primary key for the `saved_reviews` table will be changed. If it partially fails, the table could be left without primary key constraint.
  - You are about to drop the column `deleted_at` on the `saved_reviews` table. All the data in the column will be lost.
  - You are about to drop the column `user_id` on the `saved_reviews` table. All the data in the column will be lost.
  - You are about to drop the column `user_id_edited` on the `saved_reviews` table. All the data in the column will be lost.
  - You are about to alter the column `id` on the `saved_reviews` table. The data in that column could be lost. The data in that column will be cast from `UnsignedInt` to `Int`.
  - You are about to alter the column `external_id` on the `saved_reviews` table. The data in that column could be lost. The data in that column will be cast from `UnsignedBigInt` to `BigInt`.
  - You are about to alter the column `productSKU` on the `saved_reviews` table. The data in that column could be lost. The data in that column will be cast from `VarChar(255)` to `VarChar(191)`.
  - You are about to alter the column `productVariantName` on the `saved_reviews` table. The data in that column could be lost. The data in that column will be cast from `VarChar(255)` to `VarChar(191)`.
  - You are about to alter the column `location` on the `saved_reviews` table. The data in that column could be lost. The data in that column will be cast from `VarChar(255)` to `VarChar(191)`.
  - You are about to alter the column `countryIso` on the `saved_reviews` table. The data in that column could be lost. The data in that column will be cast from `VarChar(255)` to `VarChar(191)`.
  - Made the column `author` on table `saved_reviews` required. This step will fail if there are existing NULL values in that column.
  - Made the column `isFavorite` on table `saved_reviews` required. This step will fail if there are existing NULL values in that column.
  - Made the column `reviewTitle` on table `saved_reviews` required. This step will fail if there are existing NULL values in that column.
  - Made the column `reviewMessage` on table `saved_reviews` required. This step will fail if there are existing NULL values in that column.
  - Made the column `reviewDate` on table `saved_reviews` required. This step will fail if there are existing NULL values in that column.
  - Made the column `source` on table `saved_reviews` required. This step will fail if there are existing NULL values in that column.
  - Made the column `reviewVerifiedType` on table `saved_reviews` required. This step will fail if there are existing NULL values in that column.
  - Made the column `productId` on table `saved_reviews` required. This step will fail if there are existing NULL values in that column.
  - Made the column `productName` on table `saved_reviews` required. This step will fail if there are existing NULL values in that column.
  - Made the column `shopProductId` on table `saved_reviews` required. This step will fail if there are existing NULL values in that column.
  - Made the column `reviewVotesUp` on table `saved_reviews` required. This step will fail if there are existing NULL values in that column.
  - Made the column `reviewVotesDown` on table `saved_reviews` required. This step will fail if there are existing NULL values in that column.
  - Made the column `dateCreated` on table `saved_reviews` required. This step will fail if there are existing NULL values in that column.
  - Made the column `reviewType` on table `saved_reviews` required. This step will fail if there are existing NULL values in that column.
  - Made the column `widgetType` on table `saved_reviews` required. This step will fail if there are existing NULL values in that column.
  - Made the column `featured` on table `saved_reviews` required. This step will fail if there are existing NULL values in that column.
  - Made the column `updated_at` on table `saved_reviews` required. This step will fail if there are existing NULL values in that column.

*/
-- AlterTable
ALTER TABLE `saved_reviews` DROP PRIMARY KEY,
    DROP COLUMN `deleted_at`,
    DROP COLUMN `user_id`,
    DROP COLUMN `user_id_edited`,
    ADD COLUMN `sections` JSON NULL,
    MODIFY `id` INTEGER NOT NULL AUTO_INCREMENT,
    MODIFY `external_id` BIGINT NOT NULL,
    MODIFY `author` VARCHAR(191) NOT NULL,
    MODIFY `isFavorite` BOOLEAN NOT NULL DEFAULT false,
    MODIFY `reviewTitle` VARCHAR(191) NOT NULL,
    MODIFY `reviewMessage` TEXT NOT NULL,
    MODIFY `reviewDate` VARCHAR(191) NOT NULL,
    MODIFY `source` INTEGER NOT NULL,
    MODIFY `reviewVerifiedType` INTEGER NOT NULL,
    MODIFY `productId` BIGINT NOT NULL,
    MODIFY `productName` VARCHAR(191) NOT NULL,
    MODIFY `productSKU` VARCHAR(191) NULL,
    MODIFY `productVariantName` VARCHAR(191) NULL,
    MODIFY `shopProductId` BIGINT NOT NULL,
    MODIFY `location` VARCHAR(191) NULL,
    MODIFY `countryIso` VARCHAR(191) NULL,
    MODIFY `reviewVotesUp` INTEGER NOT NULL DEFAULT 0,
    MODIFY `reviewVotesDown` INTEGER NOT NULL DEFAULT 0,
    MODIFY `dateCreated` VARCHAR(191) NOT NULL,
    MODIFY `reviewType` INTEGER NOT NULL,
    MODIFY `widgetType` VARCHAR(191) NOT NULL,
    MODIFY `featured` BOOLEAN NOT NULL DEFAULT false,
    MODIFY `created_at` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
    MODIFY `updated_at` DATETIME(3) NOT NULL,
    ADD PRIMARY KEY (`id`);

-- AlterTable
ALTER TABLE `sessions` ADD COLUMN `accountOwner` BOOLEAN NULL DEFAULT false,
    ADD COLUMN `collaborator` BOOLEAN NULL DEFAULT false,
    ADD COLUMN `email` VARCHAR(255) NULL,
    ADD COLUMN `emailVerified` BOOLEAN NULL DEFAULT false,
    ADD COLUMN `firstName` VARCHAR(255) NULL,
    ADD COLUMN `lastName` VARCHAR(255) NULL,
    ADD COLUMN `locale` VARCHAR(255) NULL;

-- RedefineIndex
CREATE UNIQUE INDEX `saved_reviews_external_id_key` ON `saved_reviews`(`external_id`);
DROP INDEX `external_id` ON `saved_reviews`;
