-- ============================================================================
-- QuickCatalog — Gold Master Schema (structure only, no demo/customer data)
-- Auto-generated base for every newly provisioned store.
-- ============================================================================
SET FOREIGN_KEY_CHECKS=0;
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
SET NAMES utf8mb4;

CREATE TABLE `banner` (
  `id` int(11) NOT NULL,
  `title` varchar(200) NOT NULL,
  `subtitle` varchar(300) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `image` varchar(255) NOT NULL,
  `button_text` varchar(100) DEFAULT NULL,
  `button_link` varchar(500) DEFAULT NULL,
  `button_target` varchar(10) DEFAULT '_self',
  `text_color` varchar(20) NOT NULL DEFAULT '',
  `sort_order` int(11) NOT NULL DEFAULT 0,
  `status` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE `banner_settings` (
  `id` int(11) NOT NULL,
  `desc_font_size` varchar(10) NOT NULL DEFAULT '16',
  `text_color` varchar(20) NOT NULL DEFAULT '#ffffff',
  `btn_bg_color` varchar(20) NOT NULL DEFAULT '#2f7d32',
  `btn_text_color` varchar(20) NOT NULL DEFAULT '#ffffff',
  `text_align` varchar(10) NOT NULL DEFAULT 'left',
  `caption_position` varchar(10) NOT NULL DEFAULT 'left',
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE `breadcrumb_settings` (
  `id` int(11) NOT NULL,
  `slug` varchar(200) NOT NULL COMMENT 'URL path: shop, gallery, page/about, contact, etc.',
  `label` varchar(200) NOT NULL COMMENT 'Display title shown in breadcrumb banner',
  `image` varchar(300) NOT NULL DEFAULT '' COMMENT 'filename stored in uploads/breadcrumbs/',
  `bg_color` varchar(7) NOT NULL DEFAULT '#1a1a2e',
  `text_color` varchar(7) NOT NULL DEFAULT '#ffffff',
  `sort_order` int(11) NOT NULL DEFAULT 0,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE `category` (
  `id` int(11) NOT NULL,
  `slug` varchar(250) NOT NULL,
  `category_name` varchar(250) NOT NULL,
  `description` varchar(250) NOT NULL,
  `status` tinyint(4) NOT NULL,
  `icon` varchar(250) DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `tax_rate` decimal(5,2) DEFAULT NULL COMMENT 'overrides default if set',
  `meta_title` varchar(255) DEFAULT NULL,
  `meta_description` varchar(500) DEFAULT NULL,
  `image_shape` varchar(20) NOT NULL DEFAULT 'square',
  `bg_color` varchar(7) DEFAULT '#f0f4f8',
  `text_color` varchar(7) DEFAULT '#1a1a2e',
  `card_style` varchar(20) DEFAULT 'overlap',
  `subtitle` varchar(255) DEFAULT '',
  `name_color` varchar(30) NOT NULL DEFAULT '',
  `subtitle_color` varchar(30) NOT NULL DEFAULT '',
  `icon_color` varchar(30) NOT NULL DEFAULT '',
  `meta_keywords` varchar(500) NOT NULL DEFAULT '',
  `short_description` text DEFAULT NULL,
  `tags` varchar(500) NOT NULL DEFAULT '',
  `img_alt` varchar(300) NOT NULL DEFAULT '',
  `sort_order` int(11) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

CREATE TABLE `category_image` (
  `id` int(11) NOT NULL,
  `category_id` int(11) NOT NULL,
  `filename` varchar(255) NOT NULL,
  `alt_text` varchar(255) DEFAULT '',
  `sort_order` int(11) NOT NULL DEFAULT 0,
  `is_primary` tinyint(1) NOT NULL DEFAULT 0,
  `created_at` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

CREATE TABLE `category_theme_settings` (
  `id` int(11) NOT NULL,
  `image_shape` varchar(20) DEFAULT 'square',
  `theme_preset` varchar(50) DEFAULT 'clean',
  `icon_set` varchar(30) DEFAULT 'fontawesome',
  `primary_color` varchar(7) DEFAULT '#2f7d32',
  `secondary_color` varchar(7) DEFAULT '#4caf50',
  `text_color` varchar(7) DEFAULT '#212529',
  `card_bg_color` varchar(7) DEFAULT '#ffffff',
  `border_radius` int(11) DEFAULT 8,
  `shadow_intensity` varchar(20) DEFAULT 'medium',
  `created_at` datetime DEFAULT current_timestamp(),
  `updated_at` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE `contact_settings` (
  `id` int(11) NOT NULL DEFAULT 1,
  `icon_color` varchar(7) NOT NULL DEFAULT '#794ABA' COMMENT 'info icon background',
  `icon_text` varchar(7) NOT NULL DEFAULT '#ffffff' COMMENT 'icon symbol color',
  `accent_color` varchar(7) NOT NULL DEFAULT '#794ABA' COMMENT 'button + link color',
  `card_border` varchar(7) NOT NULL DEFAULT '#e8eaf0' COMMENT 'card border color',
  `label_color` varchar(7) NOT NULL DEFAULT '#1a1a2e' COMMENT 'info label (Address, Phone...)',
  `value_color` varchar(7) NOT NULL DEFAULT '#374151' COMMENT 'info value text color',
  `link_color` varchar(7) NOT NULL DEFAULT '#794ABA' COMMENT 'phone/email link color',
  `business_hours` varchar(200) NOT NULL DEFAULT 'Monday – Saturday, 9:30 AM – 6:30 PM',
  `title_color` varchar(20) DEFAULT '#ffffff'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE `contact_submissions` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(150) NOT NULL,
  `email` varchar(150) NOT NULL,
  `phone` varchar(40) DEFAULT NULL,
  `subject` varchar(255) DEFAULT NULL,
  `message` text NOT NULL,
  `status` enum('new','read','replied') NOT NULL DEFAULT 'new',
  `ip_addr` varchar(45) DEFAULT NULL,
  `user_agent` varchar(500) DEFAULT NULL,
  `admin_note` text DEFAULT NULL,
  `created_at` datetime DEFAULT current_timestamp(),
  `updated_at` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

CREATE TABLE `coupons` (
  `id` int(11) NOT NULL,
  `code` varchar(100) NOT NULL,
  `description` varchar(255) DEFAULT NULL,
  `discount_type` enum('fixed','percentage') NOT NULL DEFAULT 'percentage',
  `discount_value` decimal(10,2) NOT NULL,
  `min_purchase_amount` decimal(10,2) DEFAULT 0.00,
  `max_discount_amount` decimal(10,2) DEFAULT NULL,
  `usage_limit` int(11) DEFAULT NULL,
  `usage_count` int(11) DEFAULT 0,
  `user_limit` int(11) DEFAULT 1,
  `valid_from` datetime DEFAULT NULL,
  `valid_until` datetime DEFAULT NULL,
  `status` tinyint(1) DEFAULT 1,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE `coupon_usage` (
  `id` int(11) NOT NULL,
  `coupon_id` int(11) NOT NULL,
  `order_id` int(11) DEFAULT NULL,
  `customer_id` int(11) DEFAULT NULL,
  `discount_applied` decimal(10,2) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE `custom_fields` (
  `id` int(11) NOT NULL,
  `setting_name` varchar(100) NOT NULL,
  `slug` varchar(100) NOT NULL,
  `content` varchar(2000) NOT NULL,
  `status` tinyint(1) NOT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

CREATE TABLE `dashboard_video` (
  `id` int(11) NOT NULL DEFAULT 1,
  `video_title` varchar(200) NOT NULL DEFAULT '',
  `video_url` varchar(500) NOT NULL DEFAULT '',
  `video_description` text DEFAULT NULL,
  `is_enabled` tinyint(1) NOT NULL DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE `email_log` (
  `id` int(11) NOT NULL,
  `to_email` varchar(255) NOT NULL,
  `from_email` varchar(255) DEFAULT NULL,
  `subject` varchar(255) NOT NULL,
  `template` varchar(64) DEFAULT NULL,
  `body` mediumtext DEFAULT NULL,
  `status` enum('sent','failed','queued') NOT NULL DEFAULT 'queued',
  `error` text DEFAULT NULL,
  `related_id` varchar(64) DEFAULT NULL COMMENT 'order_id / user_id / etc',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE `faq_categories` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(100) NOT NULL,
  `slug` varchar(120) NOT NULL,
  `sort_order` int(11) NOT NULL DEFAULT 100,
  `status` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` datetime DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

CREATE TABLE `faq_items` (
  `id` int(10) UNSIGNED NOT NULL,
  `category_id` int(10) UNSIGNED NOT NULL,
  `question` varchar(500) NOT NULL,
  `answer` text NOT NULL,
  `sort_order` int(11) NOT NULL DEFAULT 100,
  `status` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` datetime DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

CREATE TABLE `faq_settings` (
  `id` int(11) NOT NULL DEFAULT 1,
  `accent_color` varchar(7) NOT NULL DEFAULT '#794ABA' COMMENT 'icon + open state color',
  `q_bg` varchar(7) NOT NULL DEFAULT '#ffffff' COMMENT 'question row background',
  `q_text` varchar(7) NOT NULL DEFAULT '#1a1a2e' COMMENT 'question text color',
  `a_bg` varchar(7) NOT NULL DEFAULT '#f8f5fc' COMMENT 'answer area background',
  `a_text` varchar(7) NOT NULL DEFAULT '#374151' COMMENT 'answer text color',
  `cat_color` varchar(7) NOT NULL DEFAULT '#794ABA' COMMENT 'category heading color',
  `border_color` varchar(7) NOT NULL DEFAULT '#e8eaf0' COMMENT 'item border color',
  `bc_bg` varchar(7) NOT NULL DEFAULT '#1a1a2e' COMMENT 'breadcrumb banner bg',
  `bc_text` varchar(7) NOT NULL DEFAULT '#ffffff' COMMENT 'breadcrumb title color',
  `bc_image` varchar(255) NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE `home_sections` (
  `id` int(11) NOT NULL,
  `section_key` varchar(50) NOT NULL,
  `label` varchar(100) NOT NULL,
  `title` varchar(255) DEFAULT '',
  `subtitle` varchar(255) DEFAULT '',
  `content_json` text DEFAULT NULL COMMENT 'JSON for complex section data',
  `bg_color` varchar(20) DEFAULT '#ffffff',
  `text_color` varchar(20) DEFAULT '#1a1a2e',
  `bg_image` varchar(255) DEFAULT '',
  `section_image` varchar(255) DEFAULT '',
  `bg_overlay` varchar(10) DEFAULT '0.5',
  `custom_html` mediumtext DEFAULT NULL,
  `use_custom_html` tinyint(1) DEFAULT 0,
  `padding_top` int(11) DEFAULT 70,
  `padding_bottom` int(11) DEFAULT 70,
  `is_enabled` tinyint(1) DEFAULT 1,
  `sort_order` int(11) DEFAULT 0,
  `created_at` datetime DEFAULT current_timestamp(),
  `updated_at` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE `home_settings` (
  `id` int(11) NOT NULL,
  `setting_key` varchar(100) NOT NULL,
  `setting_value` text DEFAULT NULL,
  `updated_at` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE `image_settings` (
  `id` int(11) NOT NULL,
  `web_store_logo_width` varchar(50) NOT NULL,
  `web_store_logo_height` varchar(50) NOT NULL,
  `mobile_store_logo_width` varchar(50) NOT NULL,
  `mobile_store_logo_height` varchar(50) NOT NULL,
  `footer_logo_width` varchar(50) NOT NULL,
  `footer_logo_height` varchar(50) NOT NULL,
  `featured_product_image_width` varchar(50) NOT NULL,
  `featured_product_image_height` varchar(50) NOT NULL,
  `trending_product_image_width` varchar(50) NOT NULL,
  `trending_product_image_height` varchar(50) NOT NULL,
  `shop_product_image_width` varchar(50) NOT NULL,
  `shop_product_image_height` varchar(50) NOT NULL,
  `detail_product_image_width` varchar(50) NOT NULL,
  `detail_product_image_height` varchar(50) NOT NULL,
  `related_product_image_width` varchar(50) NOT NULL,
  `related_product_image_height` varchar(50) NOT NULL,
  `side_cart_product_image_width` varchar(50) NOT NULL,
  `side_cart_product_image_height` varchar(50) NOT NULL,
  `main_cart_product_image_width` varchar(50) NOT NULL,
  `main_cart_product_image_height` varchar(50) NOT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `shop_product_image_width_mobile` int(11) NOT NULL DEFAULT 240,
  `shop_product_image_height_mobile` int(11) NOT NULL DEFAULT 240,
  `detail_product_image_width_mobile` int(11) NOT NULL DEFAULT 350,
  `detail_product_image_height_mobile` int(11) NOT NULL DEFAULT 350,
  `banner_desktop_width` int(11) NOT NULL DEFAULT 1440,
  `banner_desktop_height` int(11) NOT NULL DEFAULT 450,
  `banner_mobile_width` int(11) NOT NULL DEFAULT 480,
  `banner_mobile_height` int(11) NOT NULL DEFAULT 600,
  `breadcrumb_desktop_width` int(11) NOT NULL DEFAULT 1440,
  `breadcrumb_desktop_height` int(11) NOT NULL DEFAULT 270,
  `breadcrumb_mobile_width` int(11) NOT NULL DEFAULT 480,
  `breadcrumb_mobile_height` int(11) NOT NULL DEFAULT 180,
  `navbar_logo_height_desktop` int(11) NOT NULL DEFAULT 0,
  `navbar_logo_height_mobile` int(11) NOT NULL DEFAULT 0,
  `navbar_height_desktop` int(11) NOT NULL DEFAULT 0,
  `navbar_height_mobile` int(11) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE `login_attempt` (
  `id` int(11) NOT NULL,
  `ip` varchar(45) NOT NULL,
  `email` varchar(255) DEFAULT NULL,
  `success` tinyint(1) NOT NULL DEFAULT 0,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE `menu` (
  `id` int(11) NOT NULL,
  `menu_id` varchar(100) DEFAULT NULL,
  `label` varchar(200) NOT NULL,
  `link` varchar(100) NOT NULL,
  `parent` int(11) NOT NULL,
  `sort` int(11) NOT NULL,
  `multi_menu_id` int(11) NOT NULL,
  `lang` varchar(10) NOT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `icon` varchar(60) NOT NULL DEFAULT '',
  `color` varchar(20) NOT NULL DEFAULT '',
  `badge_text` varchar(40) NOT NULL DEFAULT '',
  `badge_color` varchar(20) NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

CREATE TABLE `multi_menu` (
  `id` int(11) NOT NULL,
  `menu_name` varchar(250) NOT NULL,
  `slug` varchar(250) NOT NULL,
  `status` tinyint(1) DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

CREATE TABLE `orders` (
  `id` int(11) NOT NULL,
  `order_id` varchar(50) NOT NULL,
  `prod_name` varchar(155) NOT NULL,
  `price` float NOT NULL,
  `quantity` int(11) NOT NULL,
  `total` float NOT NULL,
  `notes` varchar(200) NOT NULL,
  `order_status` text NOT NULL,
  `order_notes` varchar(500) NOT NULL,
  `payment_method` varchar(300) NOT NULL,
  `payment_status` text NOT NULL,
  `cust_name` varchar(250) NOT NULL,
  `cust_email` varchar(255) DEFAULT NULL,
  `cust_num` text NOT NULL,
  `cust_address` varchar(250) NOT NULL,
  `cust_city` text NOT NULL,
  `cust_state` varchar(20) NOT NULL,
  `cust_pincode` varchar(10) NOT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `cust_country` varchar(10) DEFAULT 'IN',
  `shipping_label` varchar(200) DEFAULT '',
  `shipping_amount` decimal(10,2) DEFAULT 0.00,
  `tax_amount` decimal(10,2) DEFAULT 0.00,
  `tax_breakup` text DEFAULT NULL,
  `subtotal_amount` decimal(10,2) DEFAULT 0.00,
  `grand_total` decimal(10,2) DEFAULT 0.00,
  `invoice_no` varchar(50) DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

CREATE TABLE `order_total` (
  `id` int(11) NOT NULL,
  `order_id` int(11) NOT NULL,
  `sub_total` decimal(10,2) NOT NULL,
  `total` decimal(10,2) NOT NULL,
  `tax_amount` decimal(10,2) NOT NULL,
  `shipping_cost` decimal(10,2) NOT NULL,
  `additional_charges` varchar(500) NOT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE `page` (
  `id` int(11) NOT NULL,
  `pgtitle` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `slug` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `link` text NOT NULL,
  `thumbnail` varchar(50) NOT NULL,
  `gallery` varchar(200) NOT NULL,
  `header_img` varchar(100) NOT NULL,
  `lang` int(11) NOT NULL,
  `description` varchar(1000) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `status` int(11) NOT NULL,
  `content` text CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `published` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

CREATE TABLE `pages` (
  `id` int(10) UNSIGNED NOT NULL,
  `slug` varchar(120) NOT NULL,
  `title` varchar(200) NOT NULL,
  `body` longtext NOT NULL,
  `page_template` varchar(40) NOT NULL DEFAULT 'custom',
  `sections_json` mediumtext DEFAULT NULL,
  `hero_image` varchar(255) NOT NULL DEFAULT '',
  `meta_title` varchar(200) DEFAULT NULL,
  `meta_description` varchar(500) DEFAULT NULL,
  `status` tinyint(1) NOT NULL DEFAULT 1,
  `sort_order` int(11) NOT NULL DEFAULT 100,
  `is_system` tinyint(1) NOT NULL DEFAULT 0,
  `show_in_footer` tinyint(1) NOT NULL DEFAULT 1,
  `show_breadcrumb` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` datetime DEFAULT current_timestamp(),
  `updated_at` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

CREATE TABLE `payment_option` (
  `id` int(11) NOT NULL,
  `payment_method_name` varchar(200) NOT NULL,
  `short_code` varchar(200) NOT NULL,
  `status` tinyint(1) NOT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE `products` (
  `id` int(11) NOT NULL,
  `product_name` varchar(150) NOT NULL,
  `slug` varchar(300) DEFAULT NULL,
  `stock_status` int(11) DEFAULT NULL,
  `description` text NOT NULL,
  `related` varchar(300) NOT NULL,
  `category_id` int(11) NOT NULL,
  `price` float NOT NULL,
  `prod_img` varchar(255) NOT NULL,
  `status` tinyint(4) DEFAULT NULL,
  `is_featured` tinyint(1) NOT NULL DEFAULT 0,
  `is_special_offer` tinyint(1) NOT NULL DEFAULT 0,
  `variation` text DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `meta_title` varchar(255) DEFAULT NULL,
  `meta_description` varchar(500) DEFAULT NULL,
  `meta_keywords` varchar(255) DEFAULT NULL,
  `show_price` tinyint(1) NOT NULL DEFAULT 1,
  `prod_video` varchar(500) NOT NULL DEFAULT '',
  `img_alt` varchar(300) NOT NULL DEFAULT '',
  `prod_specs` text NOT NULL,
  `vid_thumbnail` varchar(300) NOT NULL DEFAULT '',
  `show_image` tinyint(1) NOT NULL DEFAULT 1,
  `prod_urgency` varchar(200) NOT NULL DEFAULT '',
  `short_description` text NOT NULL,
  `sort_order` int(11) NOT NULL DEFAULT 0,
  `pc_title_color` varchar(20) NOT NULL DEFAULT '',
  `pc_price_color` varchar(20) NOT NULL DEFAULT '',
  `pc_cat_color` varchar(20) NOT NULL DEFAULT '',
  `pc_kicker_color` varchar(20) NOT NULL DEFAULT '',
  `pc_label_color` varchar(20) NOT NULL DEFAULT '',
  `pc_badge_color` varchar(20) NOT NULL DEFAULT '',
  `pc_card_bg` varchar(20) NOT NULL DEFAULT '',
  `pc_border_color` varchar(20) NOT NULL DEFAULT '',
  `pc_btn_bg` varchar(20) NOT NULL DEFAULT '',
  `pc_btn_text` varchar(20) NOT NULL DEFAULT '',
  `pc_wa_bg` varchar(20) NOT NULL DEFAULT '',
  `brand` varchar(150) NOT NULL DEFAULT '',
  `gtin` varchar(50) NOT NULL DEFAULT '',
  `mpn` varchar(100) NOT NULL DEFAULT '',
  `condition_status` varchar(20) NOT NULL DEFAULT 'new',
  `availability` varchar(20) NOT NULL DEFAULT 'in_stock',
  `google_product_category` varchar(255) NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

CREATE TABLE `product_displays` (
  `id` int(11) NOT NULL,
  `product_id` int(11) NOT NULL,
  `display_type` varchar(50) NOT NULL COMMENT 'featured or trending',
  `position` int(11) DEFAULT 0 COMMENT 'order position',
  `status` tinyint(1) DEFAULT 1 COMMENT '1=active, 0=inactive',
  `created_at` datetime DEFAULT current_timestamp(),
  `updated_at` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

CREATE TABLE `product_images` (
  `id` int(11) NOT NULL,
  `product_id` int(11) NOT NULL,
  `filename` varchar(255) NOT NULL,
  `alt_text` varchar(255) DEFAULT NULL,
  `sort_order` int(11) DEFAULT 0,
  `is_primary` tinyint(1) DEFAULT 0,
  `created_at` datetime DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE `product_relations` (
  `id` int(11) NOT NULL,
  `product_id` int(11) NOT NULL,
  `related_product_id` int(11) NOT NULL,
  `relation_type` enum('related','upsell','cross_sell') DEFAULT 'related',
  `display_order` int(11) DEFAULT 0,
  `created_at` timestamp NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE `product_reviews` (
  `id` int(11) NOT NULL,
  `product_id` int(11) NOT NULL,
  `customer_id` int(11) DEFAULT NULL,
  `customer_name` varchar(255) NOT NULL,
  `customer_email` varchar(255) DEFAULT NULL,
  `rating` int(11) NOT NULL DEFAULT 5,
  `title` varchar(255) DEFAULT NULL,
  `review_text` longtext DEFAULT NULL,
  `status` tinyint(1) DEFAULT 0,
  `helpful_count` int(11) DEFAULT 0,
  `unhelpful_count` int(11) DEFAULT 0,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE `razorpay` (
  `id` int(11) NOT NULL,
  `razorpay_payment_id` varchar(200) NOT NULL,
  `razorpay_order_id` varchar(200) NOT NULL,
  `razorpay_signature` varchar(500) NOT NULL,
  `brand_order_id` int(11) NOT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE `razorpay_settings` (
  `id` int(11) NOT NULL,
  `client_id` varchar(250) NOT NULL,
  `client_secret` varchar(250) NOT NULL,
  `brand_name` varchar(250) NOT NULL,
  `currency` varchar(10) NOT NULL,
  `theme_color` varchar(50) NOT NULL,
  `description` varchar(500) NOT NULL,
  `razorpay_img` varchar(250) NOT NULL,
  `create_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE `section` (
  `id` int(11) NOT NULL,
  `section_title` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `page` varchar(255) NOT NULL,
  `content` text NOT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

CREATE TABLE `seo_location_pages` (
  `id` int(11) NOT NULL,
  `city` varchar(120) NOT NULL,
  `state` varchar(120) NOT NULL DEFAULT '',
  `slug` varchar(180) NOT NULL,
  `meta_title` varchar(255) NOT NULL DEFAULT '',
  `meta_description` varchar(500) NOT NULL DEFAULT '',
  `h1_heading` varchar(255) NOT NULL DEFAULT '',
  `local_notes` text DEFAULT NULL,
  `hero_image` varchar(255) NOT NULL DEFAULT '',
  `status` tinyint(4) NOT NULL DEFAULT 0,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `sections_json` text DEFAULT NULL,
  `custom_html` longtext DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE `seo_settings` (
  `id` int(11) NOT NULL,
  `default_title` varchar(255) DEFAULT NULL,
  `title_separator` varchar(10) NOT NULL DEFAULT ' | ',
  `default_description` varchar(500) DEFAULT NULL,
  `default_keywords` varchar(255) DEFAULT NULL,
  `og_image` varchar(255) DEFAULT NULL,
  `twitter_handle` varchar(64) DEFAULT NULL,
  `ga4_id` varchar(64) DEFAULT NULL,
  `meta_pixel_id` varchar(64) DEFAULT NULL,
  `gsc_verification` varchar(255) DEFAULT NULL,
  `robots_extra` text DEFAULT NULL,
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `clarity_id` varchar(50) NOT NULL DEFAULT '',
  `gtm_id` varchar(50) NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE `setting` (
  `id` int(11) NOT NULL,
  `brand_name` varchar(50) NOT NULL,
  `tagline` varchar(300) DEFAULT NULL,
  `description` varchar(200) NOT NULL,
  `address` varchar(50) NOT NULL,
  `city` varchar(200) NOT NULL,
  `country` varchar(50) NOT NULL,
  `pincode` varchar(10) NOT NULL,
  `phone_num` varchar(20) NOT NULL,
  `company_profile` varchar(50) NOT NULL,
  `primary_color` varchar(300) DEFAULT NULL,
  `secondary_color` varchar(300) DEFAULT NULL,
  `universal_button` text NOT NULL,
  `site_title` varchar(200) DEFAULT NULL,
  `contact_num` varchar(20) DEFAULT NULL,
  `call_us_num` varchar(20) DEFAULT NULL,
  `contact_email` varchar(300) DEFAULT NULL,
  `facebook` varchar(300) DEFAULT NULL,
  `skype` varchar(300) DEFAULT NULL,
  `twitter` varchar(300) DEFAULT NULL,
  `linkedin` varchar(300) DEFAULT NULL,
  `instagram` varchar(300) DEFAULT NULL,
  `facebook_icon` varchar(200) DEFAULT NULL,
  `skype_icon` varchar(200) DEFAULT NULL,
  `twitter_icon` varchar(200) DEFAULT NULL,
  `linkedin_icon` varchar(200) DEFAULT NULL,
  `instagram_icon` varchar(200) NOT NULL,
  `social_show_facebook` tinyint(1) NOT NULL DEFAULT 1,
  `social_show_instagram` tinyint(1) NOT NULL DEFAULT 1,
  `social_show_youtube` tinyint(1) NOT NULL DEFAULT 1,
  `social_show_twitter` tinyint(1) NOT NULL DEFAULT 1,
  `social_show_linkedin` tinyint(1) NOT NULL DEFAULT 1,
  `social_show_whatsapp` tinyint(1) NOT NULL DEFAULT 1,
  `default_og_image` varchar(1000) DEFAULT NULL,
  `tax` varchar(300) NOT NULL,
  `price_status` varchar(1) DEFAULT NULL,
  `contact_from_mail` varchar(300) DEFAULT NULL,
  `contact_to_mail` varchar(300) DEFAULT NULL,
  `updated_at` datetime NOT NULL DEFAULT current_timestamp(),
  `shop_banner_img` varchar(255) NOT NULL DEFAULT '',
  `product_banner_img` varchar(255) NOT NULL DEFAULT '',
  `gallery_banner_img` varchar(255) NOT NULL DEFAULT '',
  `gallery_banner_color` varchar(7) NOT NULL DEFAULT '#1a1a2e',
  `created_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `theme_preset` varchar(20) NOT NULL DEFAULT 'purple' COMMENT 'purple|green|blue|maroon|teal|custom',
  `theme_primary` varchar(7) NOT NULL DEFAULT '#794ABA',
  `theme_secondary` varchar(7) NOT NULL DEFAULT '#45236e',
  `theme_text` varchar(7) NOT NULL DEFAULT '#1f1a30',
  `header_show_topbar` tinyint(1) NOT NULL DEFAULT 1,
  `header_topbar_text` varchar(255) NOT NULL DEFAULT '',
  `header_show_about_link` tinyint(1) NOT NULL DEFAULT 1,
  `footer_address` text DEFAULT NULL,
  `footer_phone1` varchar(50) NOT NULL DEFAULT '',
  `footer_phone2` varchar(50) NOT NULL DEFAULT '',
  `footer_email` varchar(100) NOT NULL DEFAULT '',
  `footer_map_embed` text DEFAULT NULL,
  `footer_copyright` varchar(255) NOT NULL DEFAULT '',
  `footer_show_address` tinyint(1) NOT NULL DEFAULT 1,
  `footer_show_quick_links` tinyint(1) NOT NULL DEFAULT 1,
  `footer_show_legal_links` tinyint(1) NOT NULL DEFAULT 1,
  `footer_show_map` tinyint(1) NOT NULL DEFAULT 1,
  `footer_show_social` tinyint(1) NOT NULL DEFAULT 1,
  `youtube` varchar(255) NOT NULL DEFAULT '',
  `ann_show` tinyint(1) NOT NULL DEFAULT 1,
  `ann_text` varchar(500) NOT NULL DEFAULT '',
  `ann_style` varchar(10) NOT NULL DEFAULT 'marquee' COMMENT 'marquee|static',
  `ann_speed` int(11) NOT NULL DEFAULT 40 COMMENT 'seconds for one full loop',
  `ann_bg` varchar(7) NOT NULL DEFAULT '#1f1a30',
  `ann_color` varchar(7) NOT NULL DEFAULT '#ffffff',
  `tb_bg` varchar(7) NOT NULL DEFAULT '#f8f5fc',
  `tb_color` varchar(7) NOT NULL DEFAULT '#1f1a30',
  `tb_show_email` tinyint(1) NOT NULL DEFAULT 1,
  `tb_show_address` tinyint(1) NOT NULL DEFAULT 0,
  `tb_show_social` tinyint(1) NOT NULL DEFAULT 1,
  `mh_preset` varchar(20) NOT NULL DEFAULT 'modern' COMMENT 'modern|corporate|bold',
  `mh_bg` varchar(7) NOT NULL DEFAULT '#ffffff',
  `mh_show_search` tinyint(1) NOT NULL DEFAULT 1,
  `mh_show_cart` tinyint(1) NOT NULL DEFAULT 1,
  `cta_show` tinyint(1) NOT NULL DEFAULT 0,
  `cta_text` varchar(50) NOT NULL DEFAULT 'Shop Now',
  `cta_link` varchar(255) NOT NULL DEFAULT '/shop',
  `cta_style` varchar(10) NOT NULL DEFAULT 'filled' COMMENT 'filled|outline',
  `mega_menu_on` tinyint(1) NOT NULL DEFAULT 1,
  `testimonial_bg_image` varchar(255) DEFAULT '',
  `testimonial_overlay` varchar(50) DEFAULT 'rgba(0,0,0,0.85)',
  `testimonial_heading` varchar(255) DEFAULT 'What Our Customers Say',
  `testimonial_subheading` varchar(255) DEFAULT 'Real reviews from real customers',
  `catalog_mode` tinyint(1) NOT NULL DEFAULT 1,
  `catalog_call_number` varchar(30) DEFAULT NULL,
  `catalog_whatsapp_number` varchar(30) DEFAULT NULL,
  `catalog_whatsapp_msg` varchar(400) DEFAULT NULL,
  `catalog_show_price` tinyint(1) NOT NULL DEFAULT 1,
  `catalog_enquiry_label` varchar(80) DEFAULT 'Enquire on WhatsApp',
  `catalog_call_btn_color` varchar(20) DEFAULT '#E65100',
  `catalog_call_btn_hover` varchar(20) DEFAULT '#BF360C',
  `catalog_wa_btn_color` varchar(20) DEFAULT '#25D366',
  `catalog_wa_btn_hover` varchar(20) DEFAULT '#128C7E',
  `catalog_btn_text_color` varchar(20) DEFAULT '#ffffff',
  `testi_title_color` varchar(30) NOT NULL DEFAULT '#ffffff',
  `testi_text_color` varchar(30) NOT NULL DEFAULT '#dddddd',
  `testi_star_color` varchar(30) NOT NULL DEFAULT '#f59e0b',
  `testi_card_bg` varchar(50) NOT NULL DEFAULT '#1e2a3a',
  `testi_card_border` varchar(50) NOT NULL DEFAULT '#2d3f54',
  `testi_layout` varchar(20) NOT NULL DEFAULT 'carousel',
  `hdr_template` varchar(20) NOT NULL DEFAULT 'classic',
  `hdr_bg` varchar(30) NOT NULL DEFAULT '#ffffff',
  `nav_bg` varchar(30) NOT NULL DEFAULT '#1a1a2e',
  `nav_text_color` varchar(30) NOT NULL DEFAULT '#ffffff',
  `nav_hover_color` varchar(30) NOT NULL DEFAULT '#a8ff78',
  `logo_position` varchar(20) NOT NULL DEFAULT 'left',
  `menu_align` varchar(20) NOT NULL DEFAULT 'center',
  `sticky_header` tinyint(1) NOT NULL DEFAULT 1,
  `footer_template` varchar(20) NOT NULL DEFAULT 'classic',
  `footer_bg` varchar(30) NOT NULL DEFAULT '#1a1a2e',
  `footer_text` varchar(30) NOT NULL DEFAULT '#ffffff',
  `footer_accent` varchar(30) NOT NULL DEFAULT '#a8ff78',
  `footer_link_home` tinyint(1) NOT NULL DEFAULT 1,
  `footer_link_shop` tinyint(1) NOT NULL DEFAULT 1,
  `footer_link_about` tinyint(1) NOT NULL DEFAULT 1,
  `footer_link_contact` tinyint(1) NOT NULL DEFAULT 1,
  `footer_link_gallery` tinyint(1) NOT NULL DEFAULT 1,
  `footer_link_terms` tinyint(1) NOT NULL DEFAULT 1,
  `footer_link_privacy` tinyint(1) NOT NULL DEFAULT 1,
  `footer_link_shipping` tinyint(1) NOT NULL DEFAULT 1,
  `footer_link_refund` tinyint(1) NOT NULL DEFAULT 1,
  `footer_links_json` text DEFAULT NULL COMMENT 'JSON map of individual footer link visibility',
  `footer_show_powered` tinyint(1) NOT NULL DEFAULT 1,
  `footer_powered_text` varchar(200) NOT NULL DEFAULT 'Powered by Inway',
  `footer_powered_link` varchar(300) NOT NULL DEFAULT 'https://inway.com.in',
  `favicon` varchar(255) NOT NULL DEFAULT '',
  `ann_font_size` int(11) NOT NULL DEFAULT 13,
  `ann_separator` varchar(50) NOT NULL DEFAULT ' — ',
  `testi_subheading_color` varchar(80) DEFAULT '#cccccc',
  `testi_name_color` varchar(80) DEFAULT '#ffffff',
  `view_all_btn_color` varchar(20) DEFAULT '#E65100',
  `view_all_btn_text_color` varchar(20) DEFAULT '#E65100',
  `locseo_product_category` varchar(120) NOT NULL DEFAULT '',
  `tax_status` tinyint(1) NOT NULL DEFAULT 1,
  `hide_all_prices` tinyint(1) NOT NULL DEFAULT 0,
  `currency_code` varchar(10) NOT NULL DEFAULT 'INR',
  `currency_symbol` varchar(10) NOT NULL DEFAULT '₹',
  `login_image` varchar(255) NOT NULL DEFAULT '',
  `footer_link_locations` tinyint(1) NOT NULL DEFAULT 1,
  `catalog_product_name_color` varchar(20) DEFAULT '#1a1a2e',
  `catalog_category_color` varchar(20) DEFAULT '#794ABA',
  `catalog_price_color` varchar(20) DEFAULT '#E65100',
  `catalog_label_color` varchar(20) DEFAULT '#4a6080',
  `catalog_badge_color` varchar(20) DEFAULT '#E65100',
  `catalog_card_bg_color` varchar(20) DEFAULT '',
  `catalog_card_border_color` varchar(20) DEFAULT '',
  `catalog_special_offers_heading_color` varchar(20) DEFAULT '#1a1a2e',
  `catalog_special_offers_subtitle_color` varchar(20) DEFAULT '#6b7280',
  `catalog_hot_deals_color` varchar(20) DEFAULT '#E65100',
  `catalog_product_desc_title_color` varchar(20) DEFAULT '#1a1a2e',
  `catalog_product_desc_body_color` varchar(20) DEFAULT '#555555',
  `gshop_default_brand` varchar(150) NOT NULL DEFAULT '',
  `gshop_default_category` varchar(255) NOT NULL DEFAULT '',
  `gshop_feed_enabled` tinyint(1) NOT NULL DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

CREATE TABLE `shipping_rate` (
  `id` int(11) NOT NULL,
  `zone_id` int(11) NOT NULL,
  `name` varchar(120) NOT NULL COMMENT 'e.g. Standard, Express',
  `min_order_total` decimal(10,2) NOT NULL DEFAULT 0.00,
  `max_order_total` decimal(10,2) DEFAULT NULL COMMENT 'NULL = no upper limit',
  `min_weight_kg` decimal(8,3) NOT NULL DEFAULT 0.000,
  `max_weight_kg` decimal(8,3) DEFAULT NULL,
  `rate` decimal(10,2) NOT NULL DEFAULT 0.00,
  `free_threshold` decimal(10,2) DEFAULT NULL COMMENT 'Free shipping above this order total',
  `eta_days_min` int(11) DEFAULT NULL,
  `eta_days_max` int(11) DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `sort_order` int(11) NOT NULL DEFAULT 100
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE `shipping_zone` (
  `id` int(11) NOT NULL,
  `name` varchar(120) NOT NULL,
  `zone_type` enum('state','country','rest_of_world') NOT NULL DEFAULT 'state',
  `match_codes` text NOT NULL COMMENT 'comma-separated state names or ISO country codes; * for ROW',
  `priority` int(11) NOT NULL DEFAULT 100 COMMENT 'lower = higher priority',
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE `smtp` (
  `id` int(11) NOT NULL,
  `smtp_host` varchar(255) DEFAULT NULL,
  `smtp_port` varchar(10) DEFAULT NULL,
  `smtp_username` varchar(255) DEFAULT NULL,
  `smtp_password` varchar(50) DEFAULT NULL,
  `smtp_status` tinyint(1) DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE `social_share` (
  `id` int(11) NOT NULL,
  `facebook` tinyint(1) NOT NULL,
  `whatsapp` tinyint(1) NOT NULL,
  `email` tinyint(1) NOT NULL,
  `sms` tinyint(1) NOT NULL,
  `linkedin` tinyint(1) NOT NULL,
  `pinterest` tinyint(1) NOT NULL,
  `reddit` tinyint(1) NOT NULL,
  `tumblr` tinyint(1) NOT NULL,
  `outlook` tinyint(1) NOT NULL,
  `twitter` tinyint(1) NOT NULL,
  `youtube` tinyint(1) NOT NULL DEFAULT 0,
  `instagram` tinyint(1) NOT NULL DEFAULT 0,
  `status` tinyint(1) NOT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE `stock` (
  `id` int(11) NOT NULL,
  `short_code` varchar(200) NOT NULL,
  `label` varchar(255) NOT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE `tax_settings` (
  `id` int(11) NOT NULL,
  `tax_enabled` tinyint(1) NOT NULL DEFAULT 1,
  `home_country` varchar(2) NOT NULL DEFAULT 'IN',
  `home_state` varchar(80) NOT NULL DEFAULT 'Tamil Nadu',
  `default_rate` decimal(5,2) NOT NULL DEFAULT 18.00 COMMENT 'overall percent',
  `prices_inclusive` tinyint(1) NOT NULL DEFAULT 0 COMMENT '1 = product price already includes tax',
  `gst_number` varchar(32) DEFAULT NULL,
  `legal_name` varchar(255) DEFAULT NULL,
  `invoice_address` text DEFAULT NULL,
  `invoice_prefix` varchar(10) NOT NULL DEFAULT 'YK-',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE `testimonials` (
  `id` int(11) NOT NULL,
  `customer_name` varchar(255) NOT NULL,
  `customer_email` varchar(255) DEFAULT NULL,
  `customer_image` varchar(255) DEFAULT NULL,
  `company_name` varchar(255) DEFAULT NULL,
  `designation` varchar(255) DEFAULT NULL,
  `message` longtext NOT NULL,
  `rating` int(11) DEFAULT 5,
  `product_id` int(11) DEFAULT NULL,
  `featured` tinyint(1) DEFAULT 0,
  `status` tinyint(1) DEFAULT 1,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE `upi` (
  `id` int(11) NOT NULL,
  `app_name` varchar(50) DEFAULT 'gpay',
  `qr_img` varchar(500) NOT NULL,
  `upi_id` varchar(200) DEFAULT NULL,
  `link` varchar(500) DEFAULT NULL,
  `status` varchar(1) NOT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE `user_tbl` (
  `id` int(11) NOT NULL,
  `name` varchar(50) NOT NULL,
  `username` varchar(50) NOT NULL,
  `email` varchar(200) NOT NULL,
  `profile_pic` varchar(150) NOT NULL,
  `password` varchar(255) NOT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `role` varchar(20) NOT NULL DEFAULT 'client'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

CREATE TABLE `yk_analytics_events` (
  `id` bigint(20) NOT NULL,
  `session_id` varchar(64) NOT NULL,
  `event_type` varchar(50) NOT NULL,
  `page_url` varchar(500) DEFAULT NULL,
  `page_title` varchar(300) DEFAULT NULL,
  `element_label` varchar(300) DEFAULT NULL,
  `extra_data` varchar(500) DEFAULT NULL,
  `created_at` datetime DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE `yk_analytics_sessions` (
  `id` bigint(20) NOT NULL,
  `session_id` varchar(64) NOT NULL,
  `ip_hash` varchar(64) DEFAULT NULL,
  `user_agent` varchar(500) DEFAULT NULL,
  `referrer` varchar(500) DEFAULT NULL,
  `country` varchar(100) DEFAULT NULL,
  `device` varchar(20) DEFAULT NULL,
  `created_at` datetime DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE `yk_click_log` (
  `id` int(11) NOT NULL,
  `click_type` varchar(30) NOT NULL DEFAULT '',
  `product_id` int(11) DEFAULT NULL,
  `product_name` varchar(255) NOT NULL DEFAULT '',
  `product_slug` varchar(300) NOT NULL DEFAULT '',
  `page_url` varchar(500) NOT NULL DEFAULT '',
  `referrer` varchar(500) NOT NULL DEFAULT '',
  `device` varchar(20) NOT NULL DEFAULT '',
  `ip_hash` varchar(64) NOT NULL DEFAULT '',
  `user_agent` varchar(255) NOT NULL DEFAULT '',
  `created_at` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE `yk_gallery_albums` (
  `id` int(11) NOT NULL,
  `title` varchar(200) NOT NULL,
  `slug` varchar(200) NOT NULL,
  `description` text DEFAULT NULL,
  `cover_image` varchar(300) DEFAULT NULL,
  `banner_img` varchar(300) DEFAULT NULL,
  `accent_color` varchar(20) NOT NULL DEFAULT '#E65100',
  `text_color` varchar(20) NOT NULL DEFAULT '#ffffff',
  `card_template` varchar(20) NOT NULL DEFAULT 'classic',
  `display_mode` enum('grid','masonry','carousel','justified') NOT NULL DEFAULT 'grid',
  `cols_desktop` tinyint(4) DEFAULT 3,
  `cols_mobile` tinyint(4) DEFAULT 2,
  `show_title` tinyint(1) DEFAULT 1,
  `show_description` tinyint(1) DEFAULT 1,
  `enable_lightbox` tinyint(1) DEFAULT 1,
  `status` tinyint(1) DEFAULT 1,
  `sort_order` int(11) DEFAULT 0,
  `created_at` datetime DEFAULT current_timestamp(),
  `updated_at` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE `yk_gallery_images` (
  `id` int(11) NOT NULL,
  `album_id` int(11) NOT NULL,
  `filename` varchar(300) NOT NULL,
  `title` varchar(300) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `alt_text` varchar(300) DEFAULT NULL,
  `tags` varchar(500) DEFAULT NULL,
  `sort_order` int(11) DEFAULT 0,
  `status` tinyint(1) DEFAULT 1,
  `created_at` datetime DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE `yk_schema_settings` (
  `id` int(11) NOT NULL,
  `schema_org` tinyint(1) DEFAULT 1,
  `schema_local` tinyint(1) DEFAULT 1,
  `schema_product` tinyint(1) DEFAULT 1,
  `schema_breadcrumb` tinyint(1) DEFAULT 1,
  `schema_faq` tinyint(1) DEFAULT 1,
  `schema_video` tinyint(1) DEFAULT 1,
  `schema_website` tinyint(1) DEFAULT 1,
  `business_type` varchar(100) DEFAULT 'ToyStore',
  `opening_hours` varchar(200) DEFAULT '',
  `geo_lat` varchar(30) DEFAULT '',
  `geo_lng` varchar(30) DEFAULT '',
  `price_currency` varchar(10) DEFAULT 'INR',
  `price_valid_until` date DEFAULT NULL,
  `custom_org_json` text DEFAULT NULL,
  `custom_local_json` text DEFAULT NULL,
  `updated_at` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `loc_industries` text DEFAULT NULL,
  `loc_why_choose` text DEFAULT NULL,
  `wizard_configured` tinyint(1) NOT NULL DEFAULT 0,
  `wizard_business_type` varchar(50) NOT NULL DEFAULT '',
  `wizard_can_visit` varchar(10) NOT NULL DEFAULT '',
  `wizard_branches_json` text DEFAULT NULL,
  `wizard_area` varchar(50) NOT NULL DEFAULT '',
  `wizard_area_sel_json` text DEFAULT NULL,
  `wizard_purchase` varchar(50) NOT NULL DEFAULT '',
  `wizard_delivery` varchar(50) NOT NULL DEFAULT '',
  `wizard_ship_json` text DEFAULT NULL,
  `wizard_graph_json` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE `yk_section_colors` (
  `id` int(11) NOT NULL,
  `section_key` varchar(80) NOT NULL,
  `heading_color` varchar(10) NOT NULL DEFAULT '',
  `body_color` varchar(10) NOT NULL DEFAULT '',
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `kicker_color` varchar(10) NOT NULL DEFAULT '',
  `label_color` varchar(10) NOT NULL DEFAULT '',
  `subtitle_color` varchar(10) NOT NULL DEFAULT '',
  `card_title_color` varchar(10) NOT NULL DEFAULT '',
  `card_text_color` varchar(10) NOT NULL DEFAULT '',
  `price_color` varchar(10) NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE `yk_snippets` (
  `id` int(11) NOT NULL,
  `snip_name` varchar(200) NOT NULL DEFAULT '',
  `snip_type` enum('html','css','js','text') NOT NULL DEFAULT 'html',
  `snip_code` mediumtext DEFAULT NULL,
  `description` text DEFAULT NULL,
  `category` varchar(100) DEFAULT '',
  `tags` varchar(300) DEFAULT '',
  `placement` varchar(50) DEFAULT 'shortcode',
  `page_scope` varchar(50) DEFAULT 'global',
  `priority` int(11) DEFAULT 10,
  `status` tinyint(1) DEFAULT 1,
  `schedule_start` datetime DEFAULT NULL,
  `schedule_end` datetime DEFAULT NULL,
  `usage_count` int(11) DEFAULT 0,
  `version_count` int(11) DEFAULT 1,
  `created_at` datetime DEFAULT current_timestamp(),
  `updated_at` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE `yk_snippet_versions` (
  `id` int(11) NOT NULL,
  `snippet_id` int(11) NOT NULL,
  `version_num` int(11) NOT NULL,
  `snip_code` mediumtext DEFAULT NULL,
  `created_at` datetime DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE `yk_varieties` (
  `id` int(11) NOT NULL,
  `var_key` varchar(100) NOT NULL,
  `var_value` text DEFAULT NULL,
  `updated_at` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- ---- Indexes / Primary Keys (must run BEFORE AUTO_INCREMENT below) ----
ALTER TABLE `banner`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_status_sort` (`status`,`sort_order`);

ALTER TABLE `banner_settings`
  ADD PRIMARY KEY (`id`);

ALTER TABLE `breadcrumb_settings`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `slug` (`slug`);

ALTER TABLE `category`
  ADD PRIMARY KEY (`id`);

ALTER TABLE `category_image`
  ADD PRIMARY KEY (`id`),
  ADD KEY `category_id` (`category_id`);

ALTER TABLE `category_theme_settings`
  ADD PRIMARY KEY (`id`);

ALTER TABLE `contact_settings`
  ADD PRIMARY KEY (`id`);

ALTER TABLE `contact_submissions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_contact_status` (`status`);

ALTER TABLE `coupons`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `code` (`code`),
  ADD KEY `status` (`status`);

ALTER TABLE `coupon_usage`
  ADD PRIMARY KEY (`id`),
  ADD KEY `coupon_id` (`coupon_id`);

ALTER TABLE `custom_fields`
  ADD PRIMARY KEY (`id`);

ALTER TABLE `dashboard_video`
  ADD PRIMARY KEY (`id`);

ALTER TABLE `email_log`
  ADD PRIMARY KEY (`id`),
  ADD KEY `to_email` (`to_email`),
  ADD KEY `related_id` (`related_id`),
  ADD KEY `status` (`status`),
  ADD KEY `created_at` (`created_at`);

ALTER TABLE `faq_categories`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uniq_faq_cat_slug` (`slug`);

ALTER TABLE `faq_items`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_faq_items_cat` (`category_id`);

ALTER TABLE `faq_settings`
  ADD PRIMARY KEY (`id`);

ALTER TABLE `home_sections`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `section_key` (`section_key`);

ALTER TABLE `home_settings`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `setting_key` (`setting_key`);

ALTER TABLE `image_settings`
  ADD PRIMARY KEY (`id`);

ALTER TABLE `login_attempt`
  ADD PRIMARY KEY (`id`),
  ADD KEY `ip` (`ip`),
  ADD KEY `created_at` (`created_at`);

ALTER TABLE `menu`
  ADD PRIMARY KEY (`id`);

ALTER TABLE `multi_menu`
  ADD PRIMARY KEY (`id`);

ALTER TABLE `orders`
  ADD PRIMARY KEY (`id`);

ALTER TABLE `order_total`
  ADD PRIMARY KEY (`id`);

ALTER TABLE `page`
  ADD PRIMARY KEY (`id`);

ALTER TABLE `pages`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uniq_pages_slug` (`slug`),
  ADD KEY `idx_pages_status` (`status`);

ALTER TABLE `payment_option`
  ADD PRIMARY KEY (`id`);

ALTER TABLE `products`
  ADD PRIMARY KEY (`id`),
  ADD KEY `prod_category` (`category_id`),
  ADD KEY `idx_special_offer` (`is_special_offer`);

ALTER TABLE `product_displays`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_product_display` (`product_id`,`display_type`),
  ADD KEY `display_type` (`display_type`),
  ADD KEY `product_id` (`product_id`);

ALTER TABLE `product_images`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_product_id` (`product_id`),
  ADD KEY `idx_sort_order` (`sort_order`);

ALTER TABLE `product_relations`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `product_relation` (`product_id`,`related_product_id`),
  ADD KEY `product_id` (`product_id`),
  ADD KEY `related_product_id` (`related_product_id`);

ALTER TABLE `product_reviews`
  ADD PRIMARY KEY (`id`),
  ADD KEY `product_id` (`product_id`),
  ADD KEY `status` (`status`);

ALTER TABLE `razorpay`
  ADD PRIMARY KEY (`id`);

ALTER TABLE `razorpay_settings`
  ADD PRIMARY KEY (`id`);

ALTER TABLE `section`
  ADD PRIMARY KEY (`id`);

ALTER TABLE `seo_location_pages`
  ADD PRIMARY KEY (`id`);

ALTER TABLE `seo_settings`
  ADD PRIMARY KEY (`id`);

ALTER TABLE `setting`
  ADD PRIMARY KEY (`id`);

ALTER TABLE `shipping_rate`
  ADD PRIMARY KEY (`id`),
  ADD KEY `zone_id` (`zone_id`);

ALTER TABLE `shipping_zone`
  ADD PRIMARY KEY (`id`),
  ADD KEY `is_active` (`is_active`),
  ADD KEY `priority` (`priority`);

ALTER TABLE `smtp`
  ADD PRIMARY KEY (`id`);

ALTER TABLE `social_share`
  ADD PRIMARY KEY (`id`);

ALTER TABLE `stock`
  ADD PRIMARY KEY (`id`);

ALTER TABLE `tax_settings`
  ADD PRIMARY KEY (`id`);

ALTER TABLE `testimonials`
  ADD PRIMARY KEY (`id`),
  ADD KEY `status` (`status`),
  ADD KEY `featured` (`featured`);

ALTER TABLE `upi`
  ADD PRIMARY KEY (`id`);

ALTER TABLE `user_tbl`
  ADD PRIMARY KEY (`id`);

ALTER TABLE `yk_analytics_events`
  ADD PRIMARY KEY (`id`),
  ADD KEY `event_type` (`event_type`),
  ADD KEY `created_at` (`created_at`),
  ADD KEY `session_id` (`session_id`);

ALTER TABLE `yk_analytics_sessions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `session_id` (`session_id`),
  ADD KEY `created_at` (`created_at`);

ALTER TABLE `yk_click_log`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_type_date` (`click_type`,`created_at`),
  ADD KEY `idx_product` (`product_id`);

ALTER TABLE `yk_gallery_albums`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `slug` (`slug`);

ALTER TABLE `yk_gallery_images`
  ADD PRIMARY KEY (`id`),
  ADD KEY `album_id` (`album_id`);

ALTER TABLE `yk_schema_settings`
  ADD PRIMARY KEY (`id`);

ALTER TABLE `yk_section_colors`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `section_key` (`section_key`);

ALTER TABLE `yk_snippets`
  ADD PRIMARY KEY (`id`);

ALTER TABLE `yk_snippet_versions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `snippet_id` (`snippet_id`);

ALTER TABLE `yk_varieties`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `var_key` (`var_key`);

ALTER TABLE `coupon_usage`
  ADD CONSTRAINT `coupon_usage_ibfk_1` FOREIGN KEY (`coupon_id`) REFERENCES `coupons` (`id`) ON DELETE CASCADE;

ALTER TABLE `products`
  ADD CONSTRAINT `prod_category` FOREIGN KEY (`category_id`) REFERENCES `category` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

ALTER TABLE `product_displays`
  ADD CONSTRAINT `product_displays_ibfk_1` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE;

ALTER TABLE `product_relations`
  ADD CONSTRAINT `product_relations_ibfk_1` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `product_relations_ibfk_2` FOREIGN KEY (`related_product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE;

ALTER TABLE `product_reviews`
  ADD CONSTRAINT `product_reviews_ibfk_1` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE;

ALTER TABLE `shipping_rate`
  ADD CONSTRAINT `fk_rate_zone` FOREIGN KEY (`zone_id`) REFERENCES `shipping_zone` (`id`) ON DELETE CASCADE;

-- ---- Auto Increment (must run AFTER the keys above) ----
ALTER TABLE `banner`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

ALTER TABLE `banner_settings`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

ALTER TABLE `breadcrumb_settings`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=23;

ALTER TABLE `category`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=81;

ALTER TABLE `category_image`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=67;

ALTER TABLE `category_theme_settings`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

ALTER TABLE `contact_submissions`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

ALTER TABLE `coupons`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

ALTER TABLE `coupon_usage`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

ALTER TABLE `custom_fields`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

ALTER TABLE `email_log`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

ALTER TABLE `faq_categories`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

ALTER TABLE `faq_items`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=37;

ALTER TABLE `home_sections`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=18;

ALTER TABLE `home_settings`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=30;

ALTER TABLE `image_settings`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

ALTER TABLE `login_attempt`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

ALTER TABLE `menu`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=62;

ALTER TABLE `multi_menu`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

ALTER TABLE `orders`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=569;

ALTER TABLE `order_total`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19;

ALTER TABLE `page`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14;

ALTER TABLE `pages`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

ALTER TABLE `payment_option`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

ALTER TABLE `products`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=264;

ALTER TABLE `product_displays`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

ALTER TABLE `product_images`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=36;

ALTER TABLE `product_relations`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

ALTER TABLE `product_reviews`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

ALTER TABLE `razorpay`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=26;

ALTER TABLE `razorpay_settings`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

ALTER TABLE `section`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17;

ALTER TABLE `seo_location_pages`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=24;

ALTER TABLE `seo_settings`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

ALTER TABLE `setting`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

ALTER TABLE `shipping_rate`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

ALTER TABLE `shipping_zone`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

ALTER TABLE `smtp`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

ALTER TABLE `social_share`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

ALTER TABLE `stock`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

ALTER TABLE `tax_settings`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

ALTER TABLE `testimonials`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

ALTER TABLE `upi`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;

ALTER TABLE `user_tbl`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

ALTER TABLE `yk_analytics_events`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3627;

ALTER TABLE `yk_analytics_sessions`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=419;

ALTER TABLE `yk_click_log`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

ALTER TABLE `yk_gallery_albums`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=29;

ALTER TABLE `yk_gallery_images`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=85;

ALTER TABLE `yk_schema_settings`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

ALTER TABLE `yk_section_colors`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=45;

ALTER TABLE `yk_snippets`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

ALTER TABLE `yk_snippet_versions`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

ALTER TABLE `yk_varieties`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2949;

SET FOREIGN_KEY_CHECKS=1;