· 7 years ago · Dec 25, 2018, 03:50 AM
1-- MySQL dump 10.13 Distrib 5.7.23, for Linux (x86_64)
2--
3-- Host: 192.168.10.10 Database: fastify
4-- ------------------------------------------------------
5-- Server version 5.7.22-0ubuntu18.04.1
6
7/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
8/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
9/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
10/*!40101 SET NAMES utf8 */;
11/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
12/*!40103 SET TIME_ZONE='+00:00' */;
13/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
14/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
15/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
16/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
17
18--
19-- Table structure for table `authentication`
20--
21
22DROP TABLE IF EXISTS `authentication`;
23/*!40101 SET @saved_cs_client = @@character_set_client */;
24/*!40101 SET character_set_client = utf8 */;
25CREATE TABLE `authentication` (
26 `id` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
27 `user_id` int(10) unsigned NOT NULL,
28 `secret_id` int(10) unsigned NOT NULL,
29 `created_at` timestamp NULL DEFAULT NULL,
30 `updated_at` timestamp NULL DEFAULT NULL,
31 UNIQUE KEY `authentication_id_unique` (`id`),
32 KEY `authentication_secret_id_foreign` (`secret_id`),
33 KEY `authentication_user_id_foreign` (`user_id`),
34 CONSTRAINT `authentication_secret_id_foreign` FOREIGN KEY (`secret_id`) REFERENCES `secret` (`id`),
35 CONSTRAINT `authentication_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)
36) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
37/*!40101 SET character_set_client = @saved_cs_client */;
38
39--
40-- Dumping data for table `authentication`
41--
42
43LOCK TABLES `authentication` WRITE;
44/*!40000 ALTER TABLE `authentication` DISABLE KEYS */;
45/*!40000 ALTER TABLE `authentication` ENABLE KEYS */;
46UNLOCK TABLES;
47
48--
49-- Table structure for table `secret`
50--
51
52DROP TABLE IF EXISTS `secret`;
53/*!40101 SET @saved_cs_client = @@character_set_client */;
54/*!40101 SET character_set_client = utf8 */;
55CREATE TABLE `secret` (
56 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
57 `secret` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
58 `description` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
59 `permission` json NOT NULL,
60 `created_at` timestamp NULL DEFAULT NULL,
61 `updated_at` timestamp NULL DEFAULT NULL,
62 PRIMARY KEY (`id`),
63 UNIQUE KEY `secret_secret_unique` (`secret`)
64) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
65/*!40101 SET character_set_client = @saved_cs_client */;
66
67--
68-- Dumping data for table `secret`
69--
70
71LOCK TABLES `secret` WRITE;
72/*!40000 ALTER TABLE `secret` DISABLE KEYS */;
73INSERT INTO `secret` VALUES (1,'7f46165474d11ee5836777d85df2cdab','Mobile','{}','2018-12-25 10:10:10','2018-12-25 10:10:10'),(2,'3d4fe7a00bc6fb52a91685d038733d6f','Web','{}','2018-12-25 10:10:10','2018-12-25 10:10:10');
74/*!40000 ALTER TABLE `secret` ENABLE KEYS */;
75UNLOCK TABLES;
76
77--
78-- Table structure for table `todo`
79--
80
81DROP TABLE IF EXISTS `todo`;
82/*!40101 SET @saved_cs_client = @@character_set_client */;
83/*!40101 SET character_set_client = utf8 */;
84CREATE TABLE `todo` (
85 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
86 `user_id` int(10) unsigned NOT NULL,
87 `title` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
88 `description` text COLLATE utf8mb4_unicode_ci NOT NULL,
89 `created_at` timestamp NULL DEFAULT NULL,
90 `updated_at` timestamp NULL DEFAULT NULL,
91 PRIMARY KEY (`id`),
92 KEY `todo_user_id_foreign` (`user_id`),
93 CONSTRAINT `todo_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)
94) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
95/*!40101 SET character_set_client = @saved_cs_client */;
96
97--
98-- Dumping data for table `todo`
99--
100
101LOCK TABLES `todo` WRITE;
102/*!40000 ALTER TABLE `todo` DISABLE KEYS */;
103/*!40000 ALTER TABLE `todo` ENABLE KEYS */;
104UNLOCK TABLES;
105
106--
107-- Table structure for table `users`
108--
109
110DROP TABLE IF EXISTS `users`;
111/*!40101 SET @saved_cs_client = @@character_set_client */;
112/*!40101 SET character_set_client = utf8 */;
113CREATE TABLE `users` (
114 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
115 `name` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
116 `email` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
117 `password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
118 `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
119 `created_at` timestamp NULL DEFAULT NULL,
120 `updated_at` timestamp NULL DEFAULT NULL,
121 PRIMARY KEY (`id`),
122 UNIQUE KEY `users_email_unique` (`email`)
123) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
124/*!40101 SET character_set_client = @saved_cs_client */;
125
126--
127-- Dumping data for table `users`
128--
129
130LOCK TABLES `users` WRITE;
131/*!40000 ALTER TABLE `users` DISABLE KEYS */;
132/*!40000 ALTER TABLE `users` ENABLE KEYS */;
133UNLOCK TABLES;
134
135--
136-- Dumping events for database 'fastify'
137--
138
139--
140-- Dumping routines for database 'fastify'
141--
142/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
143
144/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
145/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
146/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
147/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
148/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
149/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
150/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
151
152-- Dump completed on 2018-12-25 10:44:24