-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.sql
56 lines (48 loc) · 2.53 KB
/
schema.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 5.5.24-log - MySQL Community Server (GPL)
-- Server OS: Win64
-- HeidiSQL Version: 7.0.0.4389
-- --------------------------------------------------------
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
-- Dumping database structure for learning-phalcon
CREATE DATABASE IF NOT EXISTS `learning-phalcon` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `learning-phalcon`;
-- Dumping structure for table learning-phalcon.project
CREATE TABLE IF NOT EXISTS `project` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`user_id` int(10) unsigned NOT NULL,
`title` varchar(50) DEFAULT NULL,
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `FK__user` (`user_id`),
CONSTRAINT `FK__user` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
-- Dumping data for table learning-phalcon.project: ~0 rows (approximately)
/*!40000 ALTER TABLE `project` DISABLE KEYS */;
/*!40000 ALTER TABLE `project` ENABLE KEYS */;
-- Dumping structure for table learning-phalcon.user
CREATE TABLE IF NOT EXISTS `user` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`email` varchar(50) NOT NULL,
`password` varchar(128) NOT NULL,
`deleted` tinyint(1) DEFAULT NULL,
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8;
-- Dumping data for table learning-phalcon.user: ~2 rows (approximately)
/*!40000 ALTER TABLE `user` DISABLE KEYS */;
INSERT INTO `user` (`id`, `email`, `password`, `deleted`, `created_at`, `updated_at`) VALUES
(1, 'updated@test.com', 'test', NULL, '2013-10-14 16:57:16', '2013-10-14 17:04:23'),
(7, 'test@test.com', 'test', NULL, '2013-10-14 16:59:10', NULL),
(11, 'test@test.com', 'test', 1, '2013-10-14 16:59:10', NULL),
(13, 'test@test.com', 'test', NULL, '2013-10-14 17:34:42', NULL);
/*!40000 ALTER TABLE `user` ENABLE KEYS */;
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;