-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 15, 2023 at 03:31 PM
-- Server version: 10.4.21-MariaDB
-- PHP Version: 7.4.25

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";

-- Add New Columns to exisiting tables:

ALTER TABLE `posts`
  ADD `pp_barcode` TEXT NOT NULL DEFAULT '' AFTER `pp_sale_counter`;


ALTER TABLE `coupons`
  MODIFY `section_limit` TEXT NOT NULL DEFAULT '' COMMENT 'nolimit,pp,dp,subscribes,form_orders';


ALTER TABLE `categories`
  ADD `primary_link_type` tinyint(4) NOT NULL DEFAULT 0 COMMENT '0 means primary_link and 1 means primary_link_full_url' AFTER `title`,
  ADD `primary_link_full_url` TEXT NOT NULL DEFAULT '' AFTER `primary_link`,
  ADD `grid_width_mobile` int(11) NOT NULL DEFAULT 90 AFTER `list_img_height`,
  ADD `list_img_height_mobile` int(11) NOT NULL DEFAULT 50 AFTER `grid_width_mobile`,
  ADD `where_to_show_data` enum('android','web','both','none') NOT NULL DEFAULT 'both' AFTER `data`,
  ADD `show_sub_posts` tinyint(4) NOT NULL DEFAULT 0 COMMENT 'show posts attached to sub cats of this cat' AFTER `custom_order_options`,
  ADD `show_mixed_posts` tinyint(4) NOT NULL DEFAULT 1 COMMENT 'show posts attached to this cat sametime with sub cats' AFTER `show_sub_posts`,
  ADD `subcats_with_posts_display_mode` enum('normal','normal_scroll','boxed','boxed_scroll') NOT NULL DEFAULT 'normal' COMMENT 'works only when atleast one of show_sub_posts or show_mixed_posts is active' AFTER `show_mixed_posts`,
  ADD `subcat_boxed_img_height` int(11) NOT NULL DEFAULT 40 AFTER `subcats_with_posts_display_mode`,
  ADD `subcat_boxed_img_height_mobile` int(11) NOT NULL DEFAULT 30 AFTER `subcat_boxed_img_height`;


COMMIT;