-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtask_board.sql
More file actions
202 lines (161 loc) · 6.04 KB
/
task_board.sql
File metadata and controls
202 lines (161 loc) · 6.04 KB
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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
-- phpMyAdmin SQL Dump
-- version 4.1.12
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Sep 03, 2014 at 10:25 AM
-- Server version: 5.6.16
-- PHP Version: 5.5.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
--
-- Database: `task_board`
--
-- --------------------------------------------------------
--
-- Table structure for table `ci_sessions`
--
CREATE TABLE IF NOT EXISTS `ci_sessions` (
`session_id` varchar(40) NOT NULL DEFAULT '0',
`ip_address` varchar(16) NOT NULL DEFAULT '0',
`user_agent` varchar(120) NOT NULL,
`last_activity` int(10) unsigned NOT NULL DEFAULT '0',
`user_data` text NOT NULL,
PRIMARY KEY (`session_id`),
KEY `last_activity_idx` (`last_activity`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `ci_sessions`
--
INSERT INTO `ci_sessions` (`session_id`, `ip_address`, `user_agent`, `last_activity`, `user_data`) VALUES
('bed2461b50c00e6dedd18d4e7d7a2ac6', '127.0.0.1', 'Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:30.0) Gec', 1409658632, 'a:2:{s:6:"logged";b:1;s:4:"user";s:1:"1";}');
-- --------------------------------------------------------
--
-- Table structure for table `project`
--
CREATE TABLE IF NOT EXISTS `project` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`user` int(10) unsigned NOT NULL,
`name` varchar(255) NOT NULL,
`description` text NOT NULL,
`date_created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
--
-- Dumping data for table `project`
--
INSERT INTO `project` (`id`, `user`, `name`, `description`, `date_created`) VALUES
(1, 1, 'hs', 'dj', '2014-09-02 11:52:34');
-- --------------------------------------------------------
--
-- Table structure for table `settings`
--
CREATE TABLE IF NOT EXISTS `settings` (
`setting_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`setting_name` varchar(50) DEFAULT NULL,
`setting_value` varchar(150) DEFAULT NULL,
PRIMARY KEY (`setting_id`),
UNIQUE KEY `setting_name` (`setting_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;
--
-- Dumping data for table `settings`
--
INSERT INTO `settings` (`setting_id`, `setting_name`, `setting_value`) VALUES
(1, 'database_version', '1.2'),
(2, 'stb_install_date', '2014-09-02');
-- --------------------------------------------------------
--
-- Table structure for table `task`
--
CREATE TABLE IF NOT EXISTS `task` (
`task_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`project_id` int(10) unsigned NOT NULL,
`parent_id` int(10) unsigned DEFAULT NULL,
`user_id` int(10) unsigned NOT NULL,
`code` int(10) unsigned NOT NULL,
`status` tinyint(4) unsigned NOT NULL,
`title` varchar(50) NOT NULL,
`priority` tinyint(4) unsigned NOT NULL,
`description` text NOT NULL,
`files` text NOT NULL,
`database` text NOT NULL,
`date_created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`task_id`),
KEY `status` (`project_id`,`status`),
KEY `parent` (`parent_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;
--
-- Dumping data for table `task`
--
INSERT INTO `task` (`task_id`, `project_id`, `parent_id`, `user_id`, `code`, `status`, `title`, `priority`, `description`, `files`, `database`, `date_created`) VALUES
(1, 1, NULL, 1, 1, 0, 'zhj', 2, '', '', '', '2014-09-02 11:52:42'),
(2, 1, NULL, 1, 2, 0, 'sdyu', 2, '', '', '', '2014-09-02 11:52:52');
-- --------------------------------------------------------
--
-- Table structure for table `task_history`
--
CREATE TABLE IF NOT EXISTS `task_history` (
`task_history_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`task_id` int(10) unsigned NOT NULL,
`user_id` int(10) unsigned NOT NULL,
`status` tinyint(4) unsigned NOT NULL,
`date_created` datetime NOT NULL,
`date_finished` datetime DEFAULT NULL,
`duration` int(11) unsigned DEFAULT NULL,
PRIMARY KEY (`task_history_id`),
KEY `task` (`task_id`,`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `user`
--
CREATE TABLE IF NOT EXISTS `user` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`email` varchar(255) NOT NULL,
`password` varchar(40) NOT NULL,
`level` tinyint(4) NOT NULL,
`date_created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `email` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
--
-- Dumping data for table `user`
--
INSERT INTO `user` (`id`, `email`, `password`, `level`, `date_created`) VALUES
(1, 'abc', '420318eaceb78cf5d4de7cfe958310eb2dd15245', 0, '2014-09-02 11:52:17');
-- --------------------------------------------------------
--
-- Table structure for table `user_project`
--
CREATE TABLE IF NOT EXISTS `user_project` (
`user` int(10) unsigned NOT NULL,
`project` int(10) unsigned NOT NULL,
`date_created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`user`,`project`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `user_project`
--
INSERT INTO `user_project` (`user`, `project`, `date_created`) VALUES
(1, 1, '2014-09-02 11:52:34');
--
-- Constraints for dumped tables
--
--
-- Constraints for table `task`
--
ALTER TABLE `task`
ADD CONSTRAINT `task_stbfk_1` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION,
ADD CONSTRAINT `task_stbfk_2` FOREIGN KEY (`parent_id`) REFERENCES `task` (`task_id`) ON DELETE CASCADE ON UPDATE NO ACTION;
--
-- Constraints for table `task_history`
--
ALTER TABLE `task_history`
ADD CONSTRAINT `task_history_ibfk_1` FOREIGN KEY (`task_id`) REFERENCES `task` (`task_id`) ON DELETE CASCADE ON UPDATE NO ACTION;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;