· 8 years ago · Aug 31, 2018, 04:54 AM
1-- MySQL dump 10.16 Distrib 10.1.25-MariaDB, for Linux (x86_64)
2--
3-- Host: 127.0.0.1 Database: ijdb_sample
4-- ------------------------------------------------------
5-- Server version 5.7.16-0ubuntu0.16.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 `author`
20--
21
22DROP TABLE IF EXISTS `author`;
23/*!40101 SET @saved_cs_client = @@character_set_client */;
24/*!40101 SET character_set_client = utf8 */;
25CREATE TABLE `author` (
26 `id` int(11) NOT NULL AUTO_INCREMENT,
27 `name` varchar(255) DEFAULT NULL,
28 `email` varchar(255) DEFAULT NULL,
29 `password` varchar(255) DEFAULT NULL,
30 `permissions` int(64) NOT NULL DEFAULT 0,
31 PRIMARY KEY (`id`)
32) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
33/*!40101 SET character_set_client = @saved_cs_client */;
34
35--
36-- Dumping data for table `author`
37--
38
39
40/*!40000 ALTER TABLE `author` DISABLE KEYS */;
41INSERT INTO `author` VALUES (1,'Kevin Yank','thatguy@kevinyank.com','',0),(2,'Tom Butler','tom@r.je','',0); /* 6/5/18 JG MOD 1L: added two 0 to the last field */
42/*!40000 ALTER TABLE `author` ENABLE KEYS */;
43
44
45--
46-- Table structure for table `category`
47--
48
49DROP TABLE IF EXISTS `category`;
50/*!40101 SET @saved_cs_client = @@character_set_client */;
51/*!40101 SET character_set_client = utf8 */;
52CREATE TABLE `category` (
53 `id` int(11) NOT NULL AUTO_INCREMENT,
54 `name` varchar(255) DEFAULT NULL,
55 PRIMARY KEY (`id`)
56) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
57/*!40101 SET character_set_client = @saved_cs_client */;
58
59--
60-- Dumping data for table `category`
61--
62
63
64/*!40000 ALTER TABLE `category` DISABLE KEYS */;
65INSERT INTO `category` VALUES (1,'Programming Jokes'),(2,'One Liners');
66/*!40000 ALTER TABLE `category` ENABLE KEYS */;
67
68
69--
70-- Table structure for table `joke`
71--
72
73DROP TABLE IF EXISTS `joke`;
74/*!40101 SET @saved_cs_client = @@character_set_client */;
75/*!40101 SET character_set_client = utf8 */;
76CREATE TABLE `joke` (
77 `id` int(11) NOT NULL AUTO_INCREMENT,
78 `joketext` text,
79 `jokedate` date NOT NULL,
80 `authorId` int(11) DEFAULT NULL,
81 PRIMARY KEY (`id`)
82/* /*!40000 ALTER TABLE `author` ENABLE KEYS ; 6/6/18 JG DEL 1 just whole line with ; */
83) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8;
84/*!40101 SET character_set_client = @saved_cs_client */;
85
86--
87-- Dumping data for table `joke`
88--
89
90
91/*!40000 ALTER TABLE `joke` DISABLE KEYS */;
92INSERT INTO `joke` VALUES (1,'How many programmers does it take to screw in a lightbulb? None, it\'s a hardware problem.','2017-04-01',1),(2,'Why did the programmer quit his job? He didn\'t get arrays','2017-04-01',1),(3,'Why was the empty array stuck outside? It didn\'t have any keys','2017-04-01',2),(4,'How do functions break up? They stop calling each other','2017-08-09',2),(5,'How do you tell HTML from HTML5? Try it out in Internet Explorer. Did it work? No? It\'s HTML5','2017-08-09',2),(6,'You don\'t need any training to be a litter picker, you pick it up as you go','2017-08-09',2);
93/*!40000 ALTER TABLE `joke` ENABLE KEYS */;
94
95
96--
97-- Table structure for table `joke_category`
98--
99
100DROP TABLE IF EXISTS `joke_category`;
101/*!40101 SET @saved_cs_client = @@character_set_client */;
102/*!40101 SET character_set_client = utf8 */;
103CREATE TABLE `joke_category` (
104 `jokeId` int(11) NOT NULL,
105 `categoryId` int(11) NOT NULL,
106 PRIMARY KEY (`jokeId`,`categoryId`)
107) ENGINE=InnoDB DEFAULT CHARSET=latin1;
108/*!40101 SET character_set_client = @saved_cs_client */;
109
110--
111-- Dumping data for table `joke_category`
112--
113
114
115/*!40000 ALTER TABLE `joke_category` DISABLE KEYS */;
116INSERT INTO `joke_category` VALUES (1,1),(1,2),(2,1),(3,1),(4,2),(5,1),(6,2);
117/*!40000 ALTER TABLE `joke_category` ENABLE KEYS */;
118
119/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
120
121/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
122/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
123/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
124/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
125/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
126/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
127/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
128
129-- Dump completed on 2017-08-09 18:02:32