
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;

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

CREATE TABLE `product_variants` (
  `id` int UNSIGNED NOT NULL,
  `product_internal_id` bigint UNSIGNED NOT NULL,
  `shopify_id` bigint UNSIGNED NOT NULL,
  `product_id` bigint UNSIGNED NOT NULL,
  `title` varchar(255) NOT NULL,
  `price` float(10,2) NOT NULL,
  `sku` varchar(125) DEFAULT NULL,
  `position` int NOT NULL,
  `inventory_policy` varchar(40) NOT NULL,
  `compare_at_price` float(10,2) DEFAULT NULL,
  `fulfillment_service` varchar(30) NOT NULL,
  `inventory_management` varchar(30) DEFAULT NULL,
  `option1` varchar(100) DEFAULT NULL,
  `option2` varchar(100) DEFAULT NULL,
  `option3` varchar(100) DEFAULT NULL,
  `taxable` tinyint(1) NOT NULL,
  `barcode` varchar(100) DEFAULT NULL,
  `grams` int NOT NULL,
  `image_id` bigint DEFAULT NULL,
  `weight` float(10,2) NOT NULL,
  `weight_unit` varchar(6) NOT NULL,
  `inventory_item_id` bigint NOT NULL,
  `inventory_quantity` int NOT NULL,
  `old_inventory_quantity` int NOT NULL,
  `requires_shipping` tinyint(1) NOT NULL,
  `admin_graphql_api_id` varchar(255) NOT NULL,
  `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_variants`
--
ALTER TABLE `product_variants`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `shopify_id` (`shopify_id`),
  ADD KEY `sku` (`sku`),
  ADD KEY `product_internal_id` (`product_internal_id`);

--
-- AUTO_INCREMENT for dumped tables
--

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