Subversion Repositories cheapmusic

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
103 - 1
--
2
-- Table structure for table `sd_category`
3
--
4
 
5
CREATE TABLE `sd_category` (
6
  `id` int(11) NOT NULL,
7
  `label` varchar(120) COLLATE utf8_unicode_ci NOT NULL,
8
  `identifier` varchar(60) COLLATE utf8_unicode_ci NOT NULL,
9
  `status` tinyint(1) NOT NULL DEFAULT '1'
10
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
11
 
12
--
13
-- Dumping data for table `sd_category`
14
--
15
 
16
INSERT INTO `sd_category` (`id`, `label`, `identifier`, `status`) VALUES
17
(1, 'Todo', 'todo', 1),
18
(2, 'Notification', 'notification', 1),
19
(3, 'Directory submission', 'dir-submission', 1),
20
(4, 'Newsletter', 'newsletter', 1),
21
(5, 'Social Media Submission', 'sm-submission', 1),
22
(6, 'General', 'general', 1);
23
 
24
-- --------------------------------------------------------
25
 
26
--
27
-- Table structure for table `sd_diary_comments`
28
--
29
 
30
CREATE TABLE `sd_diary_comments` (
31
  `id` bigint(20) NOT NULL,
32
  `diary_id` bigint(20) NOT NULL,
33
  `user_id` int(11) NOT NULL,
34
  `comments` text COLLATE utf8_unicode_ci NOT NULL,
35
  `updated_time` datetime NOT NULL
36
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
37
 
38
-- --------------------------------------------------------
39
 
40
--
41
-- Table structure for table `sd_projects`
42
--
43
 
44
CREATE TABLE `sd_projects` (
45
  `id` int(11) NOT NULL,
46
  `website_id` int(11) NOT NULL,
47
  `name` varchar(120) COLLATE utf8_unicode_ci NOT NULL,
48
  `description` text COLLATE utf8_unicode_ci NOT NULL,
49
  `status` tinyint(1) NOT NULL DEFAULT '1'
50
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
51
 
52
-- --------------------------------------------------------
53
 
54
--
55
-- Table structure for table `sd_seo_diary`
56
--
57
 
58
CREATE TABLE `sd_seo_diary` (
59
  `id` bigint(20) NOT NULL,
60
  `project_id` int(11) NOT NULL,
61
  `created_user_id` int(11) NOT NULL,
62
  `assigned_user_id` int(11) NOT NULL DEFAULT '0',
63
  `category_id` int(11) NOT NULL,
64
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
65
  `description` text COLLATE utf8_unicode_ci NOT NULL,
66
  `creation_time` datetime NOT NULL,
67
  `update_time` datetime NOT NULL,
68
  `due_date` date NOT NULL,
69
  `status` enum('new','closed','cancelled','inprogress','blocked','feedback') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'new',
70
  `email_notification` tinyint(1) NOT NULL DEFAULT '0'
71
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
72
 
73
-- --------------------------------------------------------
74
 
75
--
76
-- Table structure for table `sd_settings`
77
--
78
 
79
CREATE TABLE `sd_settings` (
80
  `id` int(11) NOT NULL,
81
  `set_label` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
82
  `set_name` varchar(64) CHARACTER SET latin1 NOT NULL,
83
  `set_val` text COLLATE utf8_unicode_ci NOT NULL,
84
  `set_type` enum('small','bool','medium','large','text') CHARACTER SET latin1 DEFAULT 'small',
85
  `display` tinyint(1) NOT NULL DEFAULT '1'
86
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
87
 
88
--
89
-- Dumping data for table `sd_settings`
90
--
91
 
92
INSERT INTO `sd_settings` (`id`, `set_label`, `set_name`, `set_val`, `set_type`, `display`) VALUES
93
(1, 'Allow user to access project manager', 'SD_ALLOW_USER_PROJECTS', '0', 'bool', 1);
94
 
95
--
96
-- Indexes for dumped tables
97
--
98
 
99
--
100
-- Indexes for table `sd_category`
101
--
102
ALTER TABLE `sd_category`
103
  ADD PRIMARY KEY (`id`),
104
  ADD UNIQUE KEY `identifier` (`identifier`);
105
 
106
--
107
-- Indexes for table `sd_diary_comments`
108
--
109
ALTER TABLE `sd_diary_comments`
110
  ADD PRIMARY KEY (`id`),
111
  ADD KEY `disary_id_update` (`diary_id`),
112
  ADD KEY `user_id` (`user_id`);
113
 
114
--
115
-- Indexes for table `sd_projects`
116
--
117
ALTER TABLE `sd_projects`
118
  ADD PRIMARY KEY (`id`),
119
  ADD UNIQUE KEY `name` (`name`),
120
  ADD KEY `website_id` (`website_id`);
121
 
122
--
123
-- Indexes for table `sd_seo_diary`
124
--
125
ALTER TABLE `sd_seo_diary`
126
  ADD PRIMARY KEY (`id`),
127
  ADD KEY `diary_project_delete` (`project_id`),
128
  ADD KEY `assigned_user_id` (`assigned_user_id`),
129
  ADD KEY `created_user_id` (`created_user_id`),
130
  ADD KEY `category_id` (`category_id`);
131
 
132
--
133
-- Indexes for table `sd_settings`
134
--
135
ALTER TABLE `sd_settings`
136
  ADD PRIMARY KEY (`id`),
137
  ADD UNIQUE KEY `set_name` (`set_name`);
138
 
139
--
140
-- AUTO_INCREMENT for dumped tables
141
--
142
 
143
--
144
-- AUTO_INCREMENT for table `sd_category`
145
--
146
ALTER TABLE `sd_category`
147
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
148
--
149
-- AUTO_INCREMENT for table `sd_diary_comments`
150
--
151
ALTER TABLE `sd_diary_comments`
152
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;
153
--
154
-- AUTO_INCREMENT for table `sd_projects`
155
--
156
ALTER TABLE `sd_projects`
157
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
158
--
159
-- AUTO_INCREMENT for table `sd_seo_diary`
160
--
161
ALTER TABLE `sd_seo_diary`
162
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;
163
--
164
-- AUTO_INCREMENT for table `sd_settings`
165
--
166
ALTER TABLE `sd_settings`
167
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
168
--
169
-- Constraints for dumped tables
170
--
171
 
172
--
173
-- Constraints for table `sd_diary_comments`
174
--
175
ALTER TABLE `sd_diary_comments`
176
  ADD CONSTRAINT `disary_id_update` FOREIGN KEY (`diary_id`) REFERENCES `sd_seo_diary` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION;
177
 
178
--
179
-- Constraints for table `sd_seo_diary`
180
--
181
ALTER TABLE `sd_seo_diary`
182
  ADD CONSTRAINT `category_id` FOREIGN KEY (`category_id`) REFERENCES `sd_category` (`id`) ON UPDATE NO ACTION,
183
  ADD CONSTRAINT `diary_project_delete` FOREIGN KEY (`project_id`) REFERENCES `sd_projects` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION;
184
 
185
 
186
ALTER TABLE `sd_projects` ADD CONSTRAINT `sd_project_website_id_delete` FOREIGN KEY ( `website_id` ) REFERENCES `websites`
187
(`id`) ON DELETE CASCADE ON UPDATE NO ACTION ;
188
 
189
INSERT INTO `texts` ( `category`, `label`, `content`) VALUES
190
('seodiary', 'Add your comment here', 'Add your comment here'),
191
('seodiary', 'Diary already exist', 'Diary already exist'),
192
('seodiary', 'Edit Diary', 'Edit Diary'),
193
('seodiary', 'New task is assigned to you in SEO Diary', 'New task is assigned to you in SEO Diary'),
194
('seodiary', 'Assigned to You', 'Assigned to You'),
195
('seodiary', 'SD_ALLOW_USER_PROJECTS', 'Allow user to access project manager'),
196
('seodiary', 'New', 'New'),
197
('seodiary', 'Closed', 'Closed'),
198
('seodiary', 'Cancelled', 'Cancelled'),
199
('seodiary', 'Inprogress', 'Inprogress'),
200
('seodiary', 'Blocked', 'Blocked'),
201
('seodiary', 'Feedback', 'Feedback'),
202
('seodiary', 'Due Date', 'Due Date'),
203
('seodiary', 'Ascending', 'Ascending'),
204
('seodiary', 'Descending', 'Descending'),
205
('seodiary', 'Diary Manager', 'Diary Manager'),
206
('seodiary', 'Diary Comments', 'Diary Comments'),
207
('seodiary', 'My Tasks', 'My Tasks'),
208
('seodiary', 'Projects Manager', 'Projects Manager'),
209
('seodiary', 'Assignee', 'Assignee'),
210
('seodiary', 'Sorting', 'Sorting'),
211
('seodiary', 'New Diary', 'New Diary'),
212
('seodiary', 'Add Comment', 'Add Comment');