-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.sql
165 lines (136 loc) · 4.91 KB
/
init.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
-- --------------------------------------------------------
-- Host: 192.168.1.99
-- Server version: 5.6.23 - MySQL Community Server (GPL)
-- Server OS: Linux
-- HeidiSQL Version: 9.1.0.4867
-- --------------------------------------------------------
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8mb4 */;
/*!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 babylon
CREATE DATABASE IF NOT EXISTS `babylon` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `babylon`;
-- Dumping structure for table babylon.heart
CREATE TABLE IF NOT EXISTS `heart` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`person_id` int(11) DEFAULT NULL,
`task_id` int(11) DEFAULT NULL,
`extra` text,
PRIMARY KEY (`id`),
KEY `person_id` (`person_id`),
KEY `task_id` (`task_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Data exporting was unselected.
-- Dumping structure for table babylon.history
CREATE TABLE IF NOT EXISTS `history` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`task_id` int(11) DEFAULT NULL,
`type` int(11) DEFAULT NULL,
`status` int(11) DEFAULT NULL,
`content` text,
`creator` int(11) DEFAULT NULL,
`extra` text,
`createtime` int(11) DEFAULT NULL,
`updatetime` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `task_id` (`task_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Data exporting was unselected.
-- Dumping structure for table babylon.organization
CREATE TABLE IF NOT EXISTS `organization` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(500) DEFAULT NULL,
`description` text,
`status` int(11) DEFAULT NULL,
`extra` text,
`owner` int(11) DEFAULT NULL,
`createtime` int(11) DEFAULT NULL,
`updatetime` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Data exporting was unselected.
-- Dumping structure for table babylon.person
CREATE TABLE IF NOT EXISTS `person` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`status` int(11) DEFAULT NULL,
`email` varchar(100) DEFAULT NULL,
`name` varchar(100) DEFAULT NULL,
`password` varchar(100) DEFAULT NULL,
`description` text,
`createtime` int(11) DEFAULT NULL,
`updatetime` int(11) DEFAULT NULL,
`extra` text,
PRIMARY KEY (`id`),
KEY `email` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Data exporting was unselected.
-- Dumping structure for table babylon.person2organization
CREATE TABLE IF NOT EXISTS `person2organization` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`person_id` int(11) DEFAULT NULL,
`organization_id` int(11) DEFAULT NULL,
`sort` int(11) DEFAULT NULL,
`extra` text,
PRIMARY KEY (`id`),
KEY `person_id` (`person_id`),
KEY `organization_id` (`organization_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Data exporting was unselected.
-- Dumping structure for table babylon.person2task
CREATE TABLE IF NOT EXISTS `person2task` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`person_id` int(11) DEFAULT NULL,
`task_id` int(11) DEFAULT NULL,
`sort` int(11) DEFAULT NULL,
`extra` text,
PRIMARY KEY (`id`),
KEY `person_id` (`person_id`),
KEY `task_id` (`task_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Data exporting was unselected.
-- Dumping structure for table babylon.tag
CREATE TABLE IF NOT EXISTS `tag` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` int(11) DEFAULT NULL,
`project_id` int(11) DEFAULT NULL,
`task_id` int(11) DEFAULT NULL,
`extra` text,
PRIMARY KEY (`id`),
KEY `name_project_id` (`name`,`project_id`),
KEY `task_id` (`task_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Data exporting was unselected.
-- Dumping structure for table babylon.task
CREATE TABLE IF NOT EXISTS `task` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`organization_id` int(11) NOT NULL DEFAULT '0',
`type` int(11) DEFAULT NULL,
`status` int(11) DEFAULT NULL,
`title` varchar(500) DEFAULT NULL,
`description` text,
`complete` int(11) DEFAULT NULL,
`creator` int(11) DEFAULT NULL,
`assign` int(11) DEFAULT NULL,
`scheduletime` int(11) DEFAULT NULL,
`createtime` int(11) DEFAULT NULL,
`updatetime` int(11) DEFAULT NULL,
`extra` text,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Data exporting was unselected.
-- Dumping structure for table babylon.task2task
CREATE TABLE IF NOT EXISTS `task2task` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`task_id` int(11) DEFAULT NULL,
`parent_id` int(11) DEFAULT NULL,
`sort` int(11) DEFAULT NULL,
`extra` text,
PRIMARY KEY (`id`),
KEY `task_id` (`task_id`),
KEY `parent_id` (`parent_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Data exporting was unselected.
/*!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 */;