Skip to content

Instantly share code, notes, and snippets.

@ochui
Created August 27, 2019 13:18
Show Gist options
  • Save ochui/5d09c515af4e695a95e67bd8a7299731 to your computer and use it in GitHub Desktop.
Save ochui/5d09c515af4e695a95e67bd8a7299731 to your computer and use it in GitHub Desktop.
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 30, 2018 at 02:57 PM
-- Server version: 5.5.16
-- PHP Version: 7.1.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `stockcoupon`
--
-- --------------------------------------------------------
--
-- Table structure for table `blogs`
--
CREATE TABLE `blogs` (
`id` int(10) UNSIGNED NOT NULL,
`user_id` int(10) UNSIGNED NOT NULL,
`title` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`desc` text COLLATE utf8mb4_unicode_ci,
`slug` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`uni_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`image` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`is_active` tinyint(1) NOT NULL DEFAULT '1',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `blog_tag`
--
CREATE TABLE `blog_tag` (
`id` int(10) UNSIGNED NOT NULL,
`blog_id` int(10) UNSIGNED NOT NULL,
`tag_id` int(10) UNSIGNED NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `categories`
--
CREATE TABLE `categories` (
`id` int(10) UNSIGNED NOT NULL,
`slug` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`title` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`icon` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`image` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`is_active` tinyint(1) NOT NULL DEFAULT '1',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `comments`
--
CREATE TABLE `comments` (
`id` int(10) UNSIGNED NOT NULL,
`user_id` int(10) UNSIGNED NOT NULL,
`reply_id` int(10) UNSIGNED DEFAULT NULL,
`commentable_id` int(10) UNSIGNED NOT NULL,
`commentable_type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`body` text COLLATE utf8mb4_unicode_ci,
`is_active` tinyint(1) NOT NULL DEFAULT '1',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `coupons`
--
CREATE TABLE `coupons` (
`id` int(10) UNSIGNED NOT NULL,
`user_id` int(10) UNSIGNED NOT NULL,
`store_id` int(10) UNSIGNED NOT NULL,
`category_id` int(10) UNSIGNED NOT NULL,
`type` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`forum_category_id` int(10) UNSIGNED NOT NULL,
`uni_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`slug` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`title` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`code` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`price` int(11) DEFAULT NULL,
`discount` int(11) DEFAULT NULL,
`link` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`expiry` date DEFAULT NULL,
`rating` int(11) NOT NULL DEFAULT '0',
`detail` text COLLATE utf8mb4_unicode_ci,
`image` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`user_count` int(11) NOT NULL DEFAULT '0',
`is_featured` tinyint(1) NOT NULL DEFAULT '0',
`is_exclusive` tinyint(1) NOT NULL DEFAULT '1',
`is_front` tinyint(1) NOT NULL DEFAULT '1',
`is_active` tinyint(1) NOT NULL DEFAULT '1',
`is_verified` tinyint(1) NOT NULL DEFAULT '0',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `discussions`
--
CREATE TABLE `discussions` (
`id` int(10) UNSIGNED NOT NULL,
`user_id` int(10) UNSIGNED NOT NULL,
`forum_category_id` int(10) UNSIGNED NOT NULL,
`uni_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`slug` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`title` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`detail` text COLLATE utf8mb4_unicode_ci,
`rating` int(11) NOT NULL DEFAULT '0',
`image` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`is_featured` tinyint(1) NOT NULL DEFAULT '1',
`is_active` tinyint(1) NOT NULL DEFAULT '1',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `faqs`
--
CREATE TABLE `faqs` (
`id` int(10) UNSIGNED NOT NULL,
`faq_category_id` int(10) UNSIGNED NOT NULL,
`question` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`answer` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`like` int(11) DEFAULT NULL,
`dislike` int(11) DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `faq_categories`
--
CREATE TABLE `faq_categories` (
`id` int(10) UNSIGNED NOT NULL,
`slug` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`title` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`is_active` tinyint(1) NOT NULL DEFAULT '1',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `followers`
--
CREATE TABLE `followers` (
`id` int(10) UNSIGNED NOT NULL,
`follower_id` int(10) UNSIGNED NOT NULL,
`leader_id` int(10) UNSIGNED NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `forum_categories`
--
CREATE TABLE `forum_categories` (
`id` int(10) UNSIGNED NOT NULL,
`slug` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`category` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`title` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`detail` text COLLATE utf8mb4_unicode_ci,
`is_active` tinyint(1) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `likes`
--
CREATE TABLE `likes` (
`id` int(10) UNSIGNED NOT NULL,
`user_id` int(10) UNSIGNED NOT NULL,
`likeable_id` int(10) UNSIGNED NOT NULL,
`likeable_type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`value` int(10) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `migrations`
--
CREATE TABLE `migrations` (
`id` int(10) UNSIGNED NOT NULL,
`migration` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `migrations`
--
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
(1, '2014_10_12_000000_create_users_table', 1),
(2, '2014_10_12_100000_create_password_resets_table', 1),
(3, '2018_04_25_114049_create_categories_table', 2),
(4, '2018_04_25_114954_create_stores_table', 2),
(6, '2018_04_26_081839_create_forum_categories_table', 3),
(7, '2018_04_26_093832_create_discussions_table', 4),
(9, '2018_04_26_081745_create_coupons_table', 5),
(11, '2018_04_30_163002_create_sliders_table', 6),
(12, '2018_05_01_142304_create_socials_table', 6),
(13, '2018_05_01_143635_create_faq_categories_table', 6),
(14, '2018_05_01_144954_create_faqs_table', 6),
(15, '2018_05_03_132634_create_pages_table', 7),
(16, '2018_05_07_145445_create_followers_table', 8),
(17, '2018_05_08_080024_create_settings_table', 9),
(18, '2018_05_12_091810_create_likes_table', 10),
(19, '2018_05_15_124035_create_comments_table', 11),
(20, '2015_03_07_311070_create_tracker_paths_table', 12),
(21, '2015_03_07_311071_create_tracker_queries_table', 12),
(22, '2015_03_07_311072_create_tracker_queries_arguments_table', 12),
(23, '2015_03_07_311073_create_tracker_routes_table', 12),
(24, '2015_03_07_311074_create_tracker_routes_paths_table', 12),
(25, '2015_03_07_311075_create_tracker_route_path_parameters_table', 12),
(26, '2015_03_07_311076_create_tracker_agents_table', 12),
(27, '2015_03_07_311077_create_tracker_cookies_table', 12),
(28, '2015_03_07_311078_create_tracker_devices_table', 12),
(29, '2015_03_07_311079_create_tracker_domains_table', 12),
(30, '2015_03_07_311080_create_tracker_referers_table', 12),
(31, '2015_03_07_311081_create_tracker_geoip_table', 12),
(32, '2015_03_07_311082_create_tracker_sessions_table', 12),
(33, '2015_03_07_311083_create_tracker_errors_table', 12),
(34, '2015_03_07_311084_create_tracker_system_classes_table', 12),
(35, '2015_03_07_311085_create_tracker_log_table', 12),
(36, '2015_03_07_311086_create_tracker_events_table', 12),
(37, '2015_03_07_311087_create_tracker_events_log_table', 12),
(38, '2015_03_07_311088_create_tracker_sql_queries_table', 12),
(39, '2015_03_07_311089_create_tracker_sql_query_bindings_table', 12),
(40, '2015_03_07_311090_create_tracker_sql_query_bindings_parameters_table', 12),
(41, '2015_03_07_311091_create_tracker_sql_queries_log_table', 12),
(42, '2015_03_07_311092_create_tracker_connections_table', 12),
(43, '2015_03_07_311093_create_tracker_tables_relations', 12),
(44, '2015_03_13_311094_create_tracker_referer_search_term_table', 12),
(45, '2015_03_13_311095_add_tracker_referer_columns', 12),
(46, '2015_11_23_311096_add_tracker_referer_column_to_log', 12),
(47, '2015_11_23_311097_create_tracker_languages_table', 12),
(48, '2015_11_23_311098_add_language_id_column_to_sessions', 12),
(49, '2015_11_23_311099_add_tracker_language_foreign_key_to_sessions', 12),
(50, '2015_11_23_311100_add_nullable_to_tracker_error', 12),
(51, '2017_01_31_311101_fix_agent_name', 12),
(52, '2017_06_20_311102_add_agent_name_hash', 12),
(53, '2017_12_13_150000_fix_query_arguments', 12),
(54, '2018_06_20_155917_create_views_table', 13),
(55, '2018_09_11_095738_create_tags_table', 14),
(56, '2018_09_11_100002_create_blogs_table', 14),
(58, '2018_09_11_103427_create_blog_tag_table', 15);
-- --------------------------------------------------------
--
-- Table structure for table `pages`
--
CREATE TABLE `pages` (
`id` int(10) UNSIGNED NOT NULL,
`slug` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`title` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`body` text COLLATE utf8mb4_unicode_ci,
`widget` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `password_resets`
--
CREATE TABLE `password_resets` (
`email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`token` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `settings`
--
CREATE TABLE `settings` (
`id` int(10) UNSIGNED NOT NULL,
`w_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`w_title` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`w_email` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`w_address` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`w_phone` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`w_time` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`keywords` text COLLATE utf8mb4_unicode_ci,
`desc` text COLLATE utf8mb4_unicode_ci,
`logo` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`favicon` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`navbar_img` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`btn_title` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`btn_link` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`btn_title2` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`btn_link2` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`is_feat_slider` tinyint(1) NOT NULL DEFAULT '1',
`is_recent_deals` tinyint(1) NOT NULL DEFAULT '1',
`is_category_block` tinyint(1) NOT NULL DEFAULT '1',
`is_store_slider` tinyint(1) NOT NULL DEFAULT '1',
`f_title1` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`f_title2` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`f_title3` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`f_title4` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`footer_text` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`copyright` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`is_mailchimp` tinyint(1) NOT NULL DEFAULT '1',
`m_text` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`is_playstore` tinyint(1) NOT NULL DEFAULT '1',
`is_app_icon` tinyint(1) NOT NULL DEFAULT '1',
`blog_layout` tinyint(1) NOT NULL DEFAULT '0',
`blog_left` tinyint(1) NOT NULL DEFAULT '1',
`is_blog` tinyint(1) NOT NULL DEFAULT '1',
`footer_layout` tinyint(1) NOT NULL DEFAULT '0',
`footer_logo` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`preloader` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`currency` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`is_preloader` tinyint(1) NOT NULL DEFAULT '1',
`sidebar_abt` text COLLATE utf8mb4_unicode_ci,
`cuelink` text COLLATE utf8mb4_unicode_ci,
`is_gotop` tinyint(1) NOT NULL DEFAULT '1',
`right_click` tinyint(1) NOT NULL DEFAULT '0',
`inspect` tinyint(1) NOT NULL DEFAULT '0',
`app_link` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`playstore_link` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `settings`
--
INSERT INTO `settings` (`id`, `w_name`, `w_title`, `w_email`, `w_address`, `w_phone`, `w_time`, `keywords`, `desc`, `logo`, `favicon`, `navbar_img`, `btn_title`, `btn_link`, `btn_title2`, `btn_link2`, `is_feat_slider`, `is_recent_deals`, `is_category_block`, `is_store_slider`, `f_title1`, `f_title2`, `f_title3`, `f_title4`, `footer_text`, `copyright`, `is_mailchimp`, `m_text`, `is_playstore`, `is_app_icon`, `blog_layout`, `blog_left`, `is_blog`, `footer_layout`, `footer_logo`, `preloader`, `currency`, `is_preloader`, `sidebar_abt`, `cuelink`, `is_gotop`, `right_click`, `inspect`, `app_link`, `playstore_link`, `created_at`, `updated_at`) VALUES
(1, 'Stock Coupon', 'Stock Coupon - Laravel Coupon and Deal CMS', 'test@mediacity.co.in', 'Your Address', '+1-123-456-789', '10 AM - 8 PM', 'Stock Coupon - Responsive Coupons, Deal and Promo Template', 'Stock Coupon - Laravel Coupon and Deal CMS', 'logo.png', 'favicon.png', 'ad-01.jpg', 'Hot Deals', '#', 'Trending Items', '#', 1, 1, 1, 1, 'Market', 'Help', 'Join Community', 'Newsletter Subscribe', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nam explicabo vero optio provident,', 'All Rights Reserved.', 1, 'Get our latest news!!', 1, 1, 0, 1, 1, 1, 'logo-white.png', 'preloader.png', 'fa fa-dollar', 1, 'Lorem ipsum dolor sit amet, viri adipisicing elit. Quidem nam incidunt accusamus voluptatum in, vel omnis inventore sunt exercitationem voluptas repellendus, dolorem at recusandae nisi rem.', NULL, 1, 0, 0, 'https://www/appstore.com/', '#', NULL, '2018-09-30 07:23:35');
-- --------------------------------------------------------
--
-- Table structure for table `sliders`
--
CREATE TABLE `sliders` (
`id` int(10) UNSIGNED NOT NULL,
`is_image` tinyint(1) NOT NULL DEFAULT '1',
`title` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`heading` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`subheading` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`link` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`image` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`is_overlay` tinyint(1) NOT NULL DEFAULT '1',
`is_parallax` tinyint(1) NOT NULL DEFAULT '1',
`is_active` tinyint(1) NOT NULL DEFAULT '1',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `sliders`
--
INSERT INTO `sliders` (`id`, `is_image`, `title`, `heading`, `subheading`, `link`, `image`, `is_overlay`, `is_parallax`, `is_active`, `created_at`, `updated_at`) VALUES
(1, 1, NULL, NULL, NULL, NULL, '1536420042home.jpg', 1, 1, 1, NULL, '2018-09-30 07:19:09');
-- --------------------------------------------------------
--
-- Table structure for table `socials`
--
CREATE TABLE `socials` (
`id` int(10) UNSIGNED NOT NULL,
`title` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`icon` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`url` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `stores`
--
CREATE TABLE `stores` (
`id` int(10) UNSIGNED NOT NULL,
`slug` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`title` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`image` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`link` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`is_featured` tinyint(1) NOT NULL DEFAULT '1',
`is_active` tinyint(1) NOT NULL DEFAULT '1',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `tags`
--
CREATE TABLE `tags` (
`id` int(10) UNSIGNED NOT NULL,
`title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`slug` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`id` int(10) UNSIGNED NOT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`password` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`facebook_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`google_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`mobile` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`gender` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`dob` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`address` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`website` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`brief` text COLLATE utf8mb4_unicode_ci,
`image` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`is_admin` tinyint(1) NOT NULL DEFAULT '0',
`is_active` tinyint(1) NOT NULL DEFAULT '1',
`confirmed` tinyint(1) NOT NULL DEFAULT '0',
`confirmation_code` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `users`
--
INSERT INTO `users` (`id`, `name`, `email`, `password`, `facebook_id`, `google_id`, `mobile`, `gender`, `dob`, `address`, `website`, `brief`, `image`, `is_admin`, `is_active`, `confirmed`, `confirmation_code`, `remember_token`, `created_at`, `updated_at`) VALUES
(2, 'admin', 'admin@admin.com', '$2y$10$zUN9yMbkP7YudS5yO5NzQ.PySzLqwYuSVlLL5uwRZBsPjotay3avu', NULL, NULL, '44434344', 'm', '1987-10-12', 'dsdsdsd', 'www.coupon.com', 'wreeferwrw', NULL, 1, 1, 1, 'ddd', '6z9SuhOFoGtiFP1gKWO9B5DiFbLxBgbA9zdHh0fKAoEkOgUlfxla8hGCjDDP', '2018-04-25 04:55:34', '2018-06-01 15:06:23');
-- --------------------------------------------------------
--
-- Table structure for table `views`
--
CREATE TABLE `views` (
`id` int(10) UNSIGNED NOT NULL,
`viewable_id` int(10) UNSIGNED NOT NULL,
`viewable_type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`visitor` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`viewed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Indexes for dumped tables
--
--
-- Indexes for table `blogs`
--
ALTER TABLE `blogs`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `blogs_uni_id_unique` (`uni_id`),
ADD KEY `blogs_user_id_foreign` (`user_id`);
--
-- Indexes for table `blog_tag`
--
ALTER TABLE `blog_tag`
ADD PRIMARY KEY (`id`),
ADD KEY `blog_tag_blog_id_foreign` (`blog_id`),
ADD KEY `blog_tag_tag_id_foreign` (`tag_id`);
--
-- Indexes for table `categories`
--
ALTER TABLE `categories`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `slug` (`slug`);
--
-- Indexes for table `comments`
--
ALTER TABLE `comments`
ADD PRIMARY KEY (`id`),
ADD KEY `comments_commentable_id_commentable_type_index` (`commentable_id`,`commentable_type`),
ADD KEY `comments_user_id_foreign` (`user_id`);
--
-- Indexes for table `coupons`
--
ALTER TABLE `coupons`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `uni_id` (`uni_id`),
ADD KEY `coupons_user_id_foreign` (`user_id`),
ADD KEY `coupons_store_id_foreign` (`store_id`),
ADD KEY `coupons_category_id_foreign` (`category_id`),
ADD KEY `coupons_forum_category_id_foreign` (`forum_category_id`);
--
-- Indexes for table `discussions`
--
ALTER TABLE `discussions`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `uni_id` (`uni_id`),
ADD KEY `discussions_user_id_foreign` (`user_id`),
ADD KEY `discussions_forum_category_id_foreign` (`forum_category_id`);
--
-- Indexes for table `faqs`
--
ALTER TABLE `faqs`
ADD PRIMARY KEY (`id`),
ADD KEY `faqs_faq_category_id_foreign` (`faq_category_id`);
--
-- Indexes for table `faq_categories`
--
ALTER TABLE `faq_categories`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `slug` (`slug`);
--
-- Indexes for table `followers`
--
ALTER TABLE `followers`
ADD PRIMARY KEY (`id`),
ADD KEY `followers_follower_id_foreign` (`follower_id`),
ADD KEY `followers_leader_id_foreign` (`leader_id`);
--
-- Indexes for table `forum_categories`
--
ALTER TABLE `forum_categories`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `slug` (`slug`);
--
-- Indexes for table `likes`
--
ALTER TABLE `likes`
ADD PRIMARY KEY (`id`),
ADD KEY `likes_likeable_id_likeable_type_index` (`likeable_id`,`likeable_type`),
ADD KEY `likes_user_id_foreign` (`user_id`);
--
-- Indexes for table `migrations`
--
ALTER TABLE `migrations`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `pages`
--
ALTER TABLE `pages`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `password_resets`
--
ALTER TABLE `password_resets`
ADD KEY `password_resets_email_index` (`email`);
--
-- Indexes for table `settings`
--
ALTER TABLE `settings`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `sliders`
--
ALTER TABLE `sliders`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `socials`
--
ALTER TABLE `socials`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `stores`
--
ALTER TABLE `stores`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `slug` (`slug`);
--
-- Indexes for table `tags`
--
ALTER TABLE `tags`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `tags_title_unique` (`title`),
ADD UNIQUE KEY `slug` (`slug`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `users_email_unique` (`email`),
ADD UNIQUE KEY `provider_id` (`google_id`),
ADD UNIQUE KEY `facebook_id` (`facebook_id`);
--
-- Indexes for table `views`
--
ALTER TABLE `views`
ADD PRIMARY KEY (`id`),
ADD KEY `views_viewable_id_viewable_type_index` (`viewable_id`,`viewable_type`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `blogs`
--
ALTER TABLE `blogs`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `blog_tag`
--
ALTER TABLE `blog_tag`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `categories`
--
ALTER TABLE `categories`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `comments`
--
ALTER TABLE `comments`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `coupons`
--
ALTER TABLE `coupons`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `discussions`
--
ALTER TABLE `discussions`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `faqs`
--
ALTER TABLE `faqs`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `faq_categories`
--
ALTER TABLE `faq_categories`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `followers`
--
ALTER TABLE `followers`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `forum_categories`
--
ALTER TABLE `forum_categories`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `likes`
--
ALTER TABLE `likes`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `migrations`
--
ALTER TABLE `migrations`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=59;
--
-- AUTO_INCREMENT for table `pages`
--
ALTER TABLE `pages`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `settings`
--
ALTER TABLE `settings`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `sliders`
--
ALTER TABLE `sliders`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `socials`
--
ALTER TABLE `socials`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `stores`
--
ALTER TABLE `stores`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `tags`
--
ALTER TABLE `tags`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=33;
--
-- AUTO_INCREMENT for table `views`
--
ALTER TABLE `views`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `blogs`
--
ALTER TABLE `blogs`
ADD CONSTRAINT `blogs_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;
--
-- Constraints for table `blog_tag`
--
ALTER TABLE `blog_tag`
ADD CONSTRAINT `blog_tag_blog_id_foreign` FOREIGN KEY (`blog_id`) REFERENCES `blogs` (`id`) ON DELETE CASCADE,
ADD CONSTRAINT `blog_tag_tag_id_foreign` FOREIGN KEY (`tag_id`) REFERENCES `tags` (`id`) ON DELETE CASCADE;
--
-- Constraints for table `comments`
--
ALTER TABLE `comments`
ADD CONSTRAINT `comments_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;
--
-- Constraints for table `coupons`
--
ALTER TABLE `coupons`
ADD CONSTRAINT `coupons_category_id_foreign` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`) ON DELETE CASCADE,
ADD CONSTRAINT `coupons_forum_category_id_foreign` FOREIGN KEY (`forum_category_id`) REFERENCES `forum_categories` (`id`) ON DELETE CASCADE,
ADD CONSTRAINT `coupons_store_id_foreign` FOREIGN KEY (`store_id`) REFERENCES `stores` (`id`) ON DELETE CASCADE,
ADD CONSTRAINT `coupons_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;
--
-- Constraints for table `discussions`
--
ALTER TABLE `discussions`
ADD CONSTRAINT `discussions_forum_category_id_foreign` FOREIGN KEY (`forum_category_id`) REFERENCES `forum_categories` (`id`) ON DELETE CASCADE,
ADD CONSTRAINT `discussions_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;
--
-- Constraints for table `faqs`
--
ALTER TABLE `faqs`
ADD CONSTRAINT `faqs_faq_category_id_foreign` FOREIGN KEY (`faq_category_id`) REFERENCES `faq_categories` (`id`) ON DELETE CASCADE;
--
-- Constraints for table `followers`
--
ALTER TABLE `followers`
ADD CONSTRAINT `followers_follower_id_foreign` FOREIGN KEY (`follower_id`) REFERENCES `users` (`id`) ON DELETE CASCADE,
ADD CONSTRAINT `followers_leader_id_foreign` FOREIGN KEY (`leader_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;
--
-- Constraints for table `likes`
--
ALTER TABLE `likes`
ADD CONSTRAINT `likes_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment