-- https://www.phpmyadmin.net/
--

START TRANSACTION;



--
-- Database: `csv_global_settings`
--
CREATE DATABASE IF NOT EXISTS `csv_global_settings` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
USE `csv_global_settings`;

-- --------------------------------------------------------

--
-- Table structure for table `csv_settings`
--

CREATE TABLE `csv_settings` (
  `id` int(11) NOT NULL,
  `csv_file_name` varchar(150) COLLATE utf16_unicode_ci NOT NULL,
  `database_name` varchar(40) COLLATE utf16_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf16 COLLATE=utf16_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `database_settings`
--

CREATE TABLE `database_settings` (
  `id` int(11) NOT NULL,
  `database_name` varchar(150) COLLATE utf16_unicode_ci NOT NULL,
  `insert_enabled` tinyint(1) DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf16 COLLATE=utf16_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `global_settings`
--

CREATE TABLE `global_settings` (
  `id` int(11) NOT NULL,
  `daily_inserts_min` int(11) NOT NULL,
  `daily_inserts_max` int(11) NOT NULL,
  `daily_insert_increase_percentage` int(11) DEFAULT '10'
) ENGINE=InnoDB DEFAULT CHARSET=utf16 COLLATE=utf16_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `users_auth`
--

CREATE TABLE `users_auth` (
  `id` binary(20) NOT NULL,
  `user_id` int(10) UNSIGNED NOT NULL,
  `validator` char(64) COLLATE utf8mb4_unicode_ci NOT NULL,
  `expires` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `users_auth`
--

INSERT INTO `users_auth` (`id`, `user_id`, `validator`, `expires`) VALUES
(0x1df4e21e5ca7b09cd4279cf4aab904c174dc6e24, 1, '612c48d7e8591c57cee8e87f3a2a513c4b36e8c17f73fb7dfc7a7aefa146cafb', 1542783072),
(0x8fc9870d25d8a788b671c69c83beab74cdb1bf0d, 1, '4e4ae38925cc36aa53989a336c8f2b1ce620567efd4fceccc716b846d55a9dc2', 1542750866);

--
-- Indexes for dumped tables
--

--
-- Indexes for table `csv_settings`
--
ALTER TABLE `csv_settings`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `csv_file_name_unique` (`csv_file_name`);

--
-- Indexes for table `database_settings`
--
ALTER TABLE `database_settings`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `database_name` (`database_name`);

--
-- Indexes for table `global_settings`
--
ALTER TABLE `global_settings`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `users_auth`
--
ALTER TABLE `users_auth`
  ADD PRIMARY KEY (`id`),
  ADD KEY `uid` (`user_id`) USING BTREE;

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `csv_settings`
--
ALTER TABLE `csv_settings`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `database_settings`
--
ALTER TABLE `database_settings`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `global_settings`
--
ALTER TABLE `global_settings`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
COMMIT;

