text: -- phpMyAdmin SQL Dump
  -- version 4.5.1
  -- http://www.phpmyadmin.net
  --
  -- Host: 127.0.0.1
  -- Generation Time: Feb 17, 2016 at 05:03 PM
  -- Server version: 10.1.9-MariaDB
  -- PHP Version: 5.6.15
  
  SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
  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: `shop`
  --
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `categories`
  --
  
  CREATE TABLE `categories` (
    `id` int(10) UNSIGNED NOT NULL,
    `main_category` smallint(6) NOT NULL,
    `image_url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
    `slug` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
    `code` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `created_at` timestamp NULL DEFAULT NULL,
    `updated_at` timestamp NULL DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  
  --
  -- Dumping data for table `categories`
  --
  
  INSERT INTO `categories` (`id`, `main_category`, `image_url`, `slug`, `code`, `created_at`, `updated_at`) VALUES
  (1, 1, '55105.jpg', 'test', '', '2016-02-17 08:04:16', '2016-02-17 08:04:16');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `category_translations`
  --
  
  CREATE TABLE `category_translations` (
    `id` int(10) UNSIGNED NOT NULL,
    `category_id` int(10) UNSIGNED NOT NULL,
    `title` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
    `locale` varchar(255) COLLATE utf8_unicode_ci NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  
  --
  -- Dumping data for table `category_translations`
  --
  
  INSERT INTO `category_translations` (`id`, `category_id`, `title`, `locale`) VALUES
  (1, 1, 'test', 'bg');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `migrations`
  --
  
  CREATE TABLE `migrations` (
    `migration` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `batch` int(11) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  
  --
  -- Dumping data for table `migrations`
  --
  
  INSERT INTO `migrations` (`migration`, `batch`) VALUES
  ('2014_10_12_000000_create_users_table', 1),
  ('2014_10_12_100000_create_password_resets_table', 1),
  ('2016_02_02_115403_create_slaider_table', 1),
  ('2016_02_02_115424_create_orders_table', 1),
  ('2016_02_02_115517_create_category_table', 1),
  ('2016_02_02_115617_create_products_table', 1),
  ('2016_02_15_103341_create_order_product_table', 1);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `orders`
  --
  
  CREATE TABLE `orders` (
    `id` int(10) UNSIGNED NOT NULL,
    `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `user_name` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
    `telephone` char(20) COLLATE utf8_unicode_ci NOT NULL,
    `quantity` int(11) NOT NULL,
    `adress` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `town` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
    `comment` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `viewed` smallint(6) NOT NULL,
    `created_at` timestamp NULL DEFAULT NULL,
    `updated_at` timestamp NULL DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `order_product`
  --
  
  CREATE TABLE `order_product` (
    `id` int(10) UNSIGNED NOT NULL,
    `order_id` int(11) NOT NULL,
    `product_id` int(11) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `password_resets`
  --
  
  CREATE TABLE `password_resets` (
    `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `token` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `products`
  --
  
  CREATE TABLE `products` (
    `id` int(10) UNSIGNED NOT NULL,
    `image_url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
    `slug` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
    `categories_id` int(11) NOT NULL,
    `code` int(11) NOT NULL,
    `created_at` timestamp NULL DEFAULT NULL,
    `updated_at` timestamp NULL DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  
  --
  -- Dumping data for table `products`
  --
  
  INSERT INTO `products` (`id`, `image_url`, `slug`, `categories_id`, `code`, `created_at`, `updated_at`) VALUES
  (1, '48893.png', 'test', 1, 213, '2016-02-17 08:05:27', '2016-02-17 08:05:27');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `product_translations`
  --
  
  CREATE TABLE `product_translations` (
    `id` int(10) UNSIGNED NOT NULL,
    `product_id` int(10) UNSIGNED NOT NULL,
    `title` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
    `price` decimal(10,2) NOT NULL,
    `summary` text COLLATE utf8_unicode_ci NOT NULL,
    `description` text COLLATE utf8_unicode_ci NOT NULL,
    `locale` varchar(255) COLLATE utf8_unicode_ci NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  
  --
  -- Dumping data for table `product_translations`
  --
  
  INSERT INTO `product_translations` (`id`, `product_id`, `title`, `price`, `summary`, `description`, `locale`) VALUES
  (1, 1, 'test', '12.00', 'test', 'test', 'bg'),
  (2, 1, 'test', '144.00', 'test', 'asdasd', 'ro');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `slaiders`
  --
  
  CREATE TABLE `slaiders` (
    `id` int(10) UNSIGNED NOT NULL,
    `link` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `image_url` text COLLATE utf8_unicode_ci,
    `slug` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
    `created_at` timestamp NULL DEFAULT NULL,
    `updated_at` timestamp NULL DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `slaider_translations`
  --
  
  CREATE TABLE `slaider_translations` (
    `id` int(10) UNSIGNED NOT NULL,
    `slaider_id` int(10) UNSIGNED NOT NULL,
    `name` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
    `description` text COLLATE utf8_unicode_ci NOT NULL,
    `locale` varchar(255) COLLATE utf8_unicode_ci NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `users`
  --
  
  CREATE TABLE `users` (
    `id` int(10) UNSIGNED NOT NULL,
    `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `password` varchar(60) COLLATE utf8_unicode_ci NOT NULL,
    `telephone` char(20) COLLATE utf8_unicode_ci NOT NULL,
    `adress` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `town` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
    `role` char(10) COLLATE utf8_unicode_ci NOT NULL,
    `remember_token` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
    `created_at` timestamp NULL DEFAULT NULL,
    `updated_at` timestamp NULL DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  
  --
  -- Dumping data for table `users`
  --
  
  INSERT INTO `users` (`id`, `name`, `email`, `password`, `telephone`, `adress`, `town`, `role`, `remember_token`, `created_at`, `updated_at`) VALUES
  (1, 'test', 'bulsis_br@abv.bg', '$2y$10$/UCU98y/y/25e9mvAOCe4eEBFtEMa7RXeSJ4wXVE6mjLbJUiAOjuO', '213213213', 'asdasdas', 'sadasdasdas', 'admin', NULL, '2016-02-17 08:03:42', '2016-02-17 08:03:42');
  
  --
  -- Indexes for dumped tables
  --
  
  --
  -- Indexes for table `categories`
  --
  ALTER TABLE `categories`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `category_translations`
  --
  ALTER TABLE `category_translations`
    ADD PRIMARY KEY (`id`),
    ADD UNIQUE KEY `category_translations_category_id_locale_unique` (`category_id`,`locale`),
    ADD KEY `category_translations_locale_index` (`locale`);
  
  --
  -- Indexes for table `orders`
  --
  ALTER TABLE `orders`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `order_product`
  --
  ALTER TABLE `order_product`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `password_resets`
  --
  ALTER TABLE `password_resets`
    ADD KEY `password_resets_email_index` (`email`),
    ADD KEY `password_resets_token_index` (`token`);
  
  --
  -- Indexes for table `products`
  --
  ALTER TABLE `products`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `product_translations`
  --
  ALTER TABLE `product_translations`
    ADD PRIMARY KEY (`id`),
    ADD UNIQUE KEY `product_translations_product_id_locale_unique` (`product_id`,`locale`),
    ADD KEY `product_translations_locale_index` (`locale`);
  
  --
  -- Indexes for table `slaiders`
  --
  ALTER TABLE `slaiders`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `slaider_translations`
  --
  ALTER TABLE `slaider_translations`
    ADD PRIMARY KEY (`id`),
    ADD UNIQUE KEY `slaider_translations_slaider_id_locale_unique` (`slaider_id`,`locale`),
    ADD KEY `slaider_translations_locale_index` (`locale`);
  
  --
  -- Indexes for table `users`
  --
  ALTER TABLE `users`
    ADD PRIMARY KEY (`id`),
    ADD UNIQUE KEY `users_email_unique` (`email`);
  
  --
  -- AUTO_INCREMENT for dumped tables
  --
  
  --
  -- AUTO_INCREMENT for table `categories`
  --
  ALTER TABLE `categories`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
  --
  -- AUTO_INCREMENT for table `category_translations`
  --
  ALTER TABLE `category_translations`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
  --
  -- AUTO_INCREMENT for table `orders`
  --
  ALTER TABLE `orders`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
  --
  -- AUTO_INCREMENT for table `order_product`
  --
  ALTER TABLE `order_product`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
  --
  -- AUTO_INCREMENT for table `products`
  --
  ALTER TABLE `products`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
  --
  -- AUTO_INCREMENT for table `product_translations`
  --
  ALTER TABLE `product_translations`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
  --
  -- AUTO_INCREMENT for table `slaiders`
  --
  ALTER TABLE `slaiders`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
  --
  -- AUTO_INCREMENT for table `slaider_translations`
  --
  ALTER TABLE `slaider_translations`
    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=2;
  --
  -- Constraints for dumped tables
  --
  
  --
  -- Constraints for table `category_translations`
  --
  ALTER TABLE `category_translations`
    ADD CONSTRAINT `category_translations_category_id_foreign` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`) ON DELETE CASCADE;
  
  --
  -- Constraints for table `product_translations`
  --
  ALTER TABLE `product_translations`
    ADD CONSTRAINT `product_translations_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE;
  
  --
  -- Constraints for table `slaider_translations`
  --
  ALTER TABLE `slaider_translations`
    ADD CONSTRAINT `slaider_translations_slaider_id_foreign` FOREIGN KEY (`slaider_id`) REFERENCES `slaiders` (`id`) ON DELETE CASCADE;
  
  /*!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 */;
  