· 7 years ago · Sep 12, 2018, 08:16 AM
1-- Adminer 4.6.3 MySQL dump
2
3SET NAMES utf8;
4SET time_zone = '+00:00';
5SET foreign_key_checks = 0;
6SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
7
8SET NAMES utf8mb4;
9
10DROP TABLE IF EXISTS `authorization_codes`;
11CREATE TABLE `authorization_codes` (
12 `code` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
13 `user_id` int(10) unsigned NOT NULL,
14 `client_id` int(10) unsigned NOT NULL,
15 `scope` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
16 `ttl` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
17 PRIMARY KEY (`code`),
18 KEY `authorization_codes_user_id_foreign` (`user_id`),
19 KEY `authorization_codes_client_id_foreign` (`client_id`),
20 CONSTRAINT `authorization_codes_client_id_foreign` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`),
21 CONSTRAINT `authorization_codes_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)
22) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
23
24
25DROP TABLE IF EXISTS `clients`;
26CREATE TABLE `clients` (
27 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
28 `redirect_uri` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
29 `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
30 `description` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
31 `secret` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
32 PRIMARY KEY (`id`)
33) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
34
35INSERT INTO `clients` (`id`, `redirect_uri`, `name`, `description`, `secret`) VALUES
36(1, 'leads-dev.evollu.com', 'Leads', 'Evollu Leads', 'secretp@ssword');
37
38DROP TABLE IF EXISTS `refresh_tokens`;
39CREATE TABLE `refresh_tokens` (
40 `token` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
41 `user_id` int(10) unsigned NOT NULL,
42 `client_id` int(10) unsigned NOT NULL,
43 `scope` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
44 PRIMARY KEY (`token`),
45 KEY `refresh_tokens_user_id_foreign` (`user_id`),
46 KEY `refresh_tokens_client_id_foreign` (`client_id`),
47 CONSTRAINT `refresh_tokens_client_id_foreign` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`),
48 CONSTRAINT `refresh_tokens_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)
49) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
50
51
52DROP TABLE IF EXISTS `tokens`;
53CREATE TABLE `tokens` (
54 `token` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
55 `user_id` int(10) unsigned NOT NULL,
56 `client_id` int(10) unsigned NOT NULL,
57 `scope` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
58 `ttl` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
59 PRIMARY KEY (`token`),
60 KEY `tokens_user_id_foreign` (`user_id`),
61 KEY `tokens_client_id_foreign` (`client_id`),
62 CONSTRAINT `tokens_client_id_foreign` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`),
63 CONSTRAINT `tokens_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)
64) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
65
66
67-- 2018-09-12 08:12:53