SET
SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;

--
-- Table structure for table `product_variants`
--

CREATE TABLE `saved_reviews`
(
  `id`                     int UNSIGNED NOT NULL,

  `external_id`            bigint UNSIGNED NOT NULL,
  author                   varchar(255)       DEFAULT NULL,
  isFavorite               int                DEFAULT 0,
  reviewTitle              varchar(255)       DEFAULT NULL,
  reviewMessage            text               DEFAULT NULL,
  reviewRating             int       NOT NULL,
  reviewDate               varchar(255)       DEFAULT NULL,
  reviewUserPhotos         text               DEFAULT NULL,
  source                   int                DEFAULT NULL,
  reviewVerifiedType       int                DEFAULT NULL,
  reviewReply              text               DEFAULT NULL,
  productId                bigint UNSIGNED DEFAULT NULL,
  productName              varchar(255)       DEFAULT NULL,
  productSKU               varchar(255)       DEFAULT NULL,
  productVariantName       varchar(255)       DEFAULT NULL,
  shopProductId            bigint UNSIGNED DEFAULT NULL,
  productUrl               text               DEFAULT NULL,
  productImageUrl          text               DEFAULT NULL,
  productImageLargeUrl     text               DEFAULT NULL,
  productImageThumbnailUrl text               DEFAULT NULL,
  avatar                   text               DEFAULT NULL,
  location                 varchar(255)       DEFAULT NULL,
  countryIso               varchar(255)       DEFAULT NULL,
  reviewVotesUp            int                DEFAULT 0,
  reviewVotesDown          int                DEFAULT 0,
  dateCreated              varchar(255)       DEFAULT NULL,
  reviewType               int                DEFAULT 0,
  widgetType               varchar(255)       DEFAULT NULL,
  reviewOptionsList        text               DEFAULT NULL,
  featured                 int                DEFAULT 0,

  `created_at`             timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at`             timestamp NULL DEFAULT NULL,
  `deleted_at`             timestamp NULL DEFAULT NULL,
  `user_id`                int                DEFAULT NULL,
  `user_id_edited`         int                DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `product_images`
--
ALTER TABLE `saved_reviews`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `external_id` (`external_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `product_images`
--
ALTER TABLE `saved_reviews`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;
COMMIT;
