text: -- phpMyAdmin SQL Dump
  -- version 4.9.0.1
  -- https://www.phpmyadmin.net/
  --
  -- Хост: localhost
  -- Время создания: Апр 21 2020 г., 04:31
  -- Версия сервера: 10.1.44-MariaDB-0ubuntu0.18.04.1
  -- Версия PHP: 7.2.24-0ubuntu0.18.04.4
  
  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 */;
  
  --
  -- База данных: `larapizza`
  --
  
  -- --------------------------------------------------------
  
  --
  -- Структура таблицы `history`
  --
  
  CREATE TABLE `history` (
    `id` int(10) UNSIGNED NOT NULL,
    `order_id` int(11) NOT NULL,
    `product_id` int(11) NOT NULL,
    `product_count` int(11) NOT NULL,
    `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
    `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  
  -- --------------------------------------------------------
  
  --
  -- Структура таблицы `migrations`
  --
  
  CREATE TABLE `migrations` (
    `id` int(10) UNSIGNED NOT NULL,
    `migration` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `batch` int(11) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  
  --
  -- Дамп данных таблицы `migrations`
  --
  
  INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
  (12, '2014_10_12_000000_create_users_table', 1),
  (13, '2014_10_12_100000_create_password_resets_table', 1),
  (14, '2020_04_02_172956_create_products_table', 1),
  (15, '2020_04_20_123728_create_settings_table', 1),
  (16, '2020_04_20_124737_add_product_image_colums_to_products_table', 2),
  (17, '2020_04_20_145453_create_sessions_table', 3),
  (18, '2020_04_20_215453_create_orders_table', 4),
  (19, '2020_04_20_221247_add_full_name_and_full_address_colums_to_users_table', 4),
  (20, '2020_04_20_221607_create_history_table', 4),
  (21, '2020_04_20_222738_add_phone_colums_to_users_table', 5),
  (22, '2020_04_20_223751_set_password_nullable_in_users_table', 6),
  (23, '2020_04_20_224723_add_currency_to_orders_table', 7);
  
  -- --------------------------------------------------------
  
  --
  -- Структура таблицы `orders`
  --
  
  CREATE TABLE `orders` (
    `id` int(10) UNSIGNED NOT NULL,
    `client_id` int(11) NOT NULL,
    `order_total` decimal(8,2) NOT NULL,
    `order_currency` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `payment_method` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
    `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  
  -- --------------------------------------------------------
  
  --
  -- Структура таблицы `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 NULL DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  
  -- --------------------------------------------------------
  
  --
  -- Структура таблицы `products`
  --
  
  CREATE TABLE `products` (
    `id` int(10) UNSIGNED NOT NULL,
    `product_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `product_price` decimal(8,2) NOT NULL,
    `product_image` 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;
  
  --
  -- Дамп данных таблицы `products`
  --
  
  INSERT INTO `products` (`id`, `product_name`, `product_price`, `product_image`, `created_at`, `updated_at`) VALUES
  (1, 'Alabama', '75.95', 'product-1.jpg', NULL, NULL),
  (2, 'California', '89.99', 'product-2.jpg', NULL, NULL),
  (3, 'Indiana', '91.87', 'product-3.jpg', NULL, NULL),
  (4, 'Minnesota', '105.65', 'product-4.jpg', NULL, NULL),
  (5, 'Nevada', '149.99', 'product-5.jpg', NULL, NULL),
  (6, 'Texas', '110.55', 'product-6.jpg', NULL, NULL),
  (7, 'Virginia', '124.99', 'product-7.jpg', NULL, NULL),
  (8, 'Wisconsin', '135.65', 'product-8.jpg', NULL, NULL);
  
  -- --------------------------------------------------------
  
  --
  -- Структура таблицы `sessions`
  --
  
  CREATE TABLE `sessions` (
    `id` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `user_id` int(11) DEFAULT NULL,
    `ip_address` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
    `user_agent` text COLLATE utf8_unicode_ci,
    `payload` text COLLATE utf8_unicode_ci NOT NULL,
    `last_activity` int(11) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  
  -- --------------------------------------------------------
  
  --
  -- Структура таблицы `settings`
  --
  
  CREATE TABLE `settings` (
    `id` int(10) UNSIGNED NOT NULL,
    `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `value` 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;
  
  -- --------------------------------------------------------
  
  --
  -- Структура таблицы `users`
  --
  
  CREATE TABLE `users` (
    `id` int(10) UNSIGNED NOT NULL,
    `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `phone` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
    `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `first_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
    `last_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
    `full_address` text COLLATE utf8_unicode_ci,
    `remember_token` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
    `password` varchar(255) 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;
  
  --
  -- Индексы сохранённых таблиц
  --
  
  --
  -- Индексы таблицы `history`
  --
  ALTER TABLE `history`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Индексы таблицы `migrations`
  --
  ALTER TABLE `migrations`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Индексы таблицы `orders`
  --
  ALTER TABLE `orders`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Индексы таблицы `password_resets`
  --
  ALTER TABLE `password_resets`
    ADD KEY `password_resets_email_index` (`email`),
    ADD KEY `password_resets_token_index` (`token`);
  
  --
  -- Индексы таблицы `products`
  --
  ALTER TABLE `products`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Индексы таблицы `sessions`
  --
  ALTER TABLE `sessions`
    ADD UNIQUE KEY `sessions_id_unique` (`id`);
  
  --
  -- Индексы таблицы `settings`
  --
  ALTER TABLE `settings`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Индексы таблицы `users`
  --
  ALTER TABLE `users`
    ADD PRIMARY KEY (`id`),
    ADD UNIQUE KEY `users_email_unique` (`email`);
  
  --
  -- AUTO_INCREMENT для сохранённых таблиц
  --
  
  --
  -- AUTO_INCREMENT для таблицы `history`
  --
  ALTER TABLE `history`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
  
  --
  -- AUTO_INCREMENT для таблицы `migrations`
  --
  ALTER TABLE `migrations`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=24;
  
  --
  -- AUTO_INCREMENT для таблицы `orders`
  --
  ALTER TABLE `orders`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
  
  --
  -- AUTO_INCREMENT для таблицы `products`
  --
  ALTER TABLE `products`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
  
  --
  -- AUTO_INCREMENT для таблицы `settings`
  --
  ALTER TABLE `settings`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
  
  --
  -- AUTO_INCREMENT для таблицы `users`
  --
  ALTER TABLE `users`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
  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 */;
  