blob: 24bd32913cafba6c446a219c207a54403271036b [file] [log] [blame]
droy27e97e02007-11-27 16:44:19 +00001-- MySQL dump 10.10
2--
3-- Host: localhost Database: babelstg
4-- ------------------------------------------------------
5-- Server version 5.0.18
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
droyd0a9b1a2008-01-29 19:51:46 +000018DROP TABLE IF EXISTS event_log;
droy3e7f3a82007-11-29 19:35:51 +000019CREATE TABLE `event_log` (
20 `event_id` int(10) unsigned NOT NULL auto_increment,
21 `table_name` varchar(100) NOT NULL,
22 `key_name` varchar(100) NOT NULL,
23 `key_value` varchar(100) default NULL,
24 `action` varchar(100) NOT NULL,
25 `userid` mediumint(9) NOT NULL,
26 `created_on` datetime NOT NULL,
27 PRIMARY KEY (`event_id`)
28) ENGINE=MyISAM DEFAULT CHARSET=utf8;
droy27e97e02007-11-27 16:44:19 +000029
30DROP TABLE IF EXISTS `files`;
31CREATE TABLE `files` (
droye5c99812007-11-28 21:36:51 +000032 `file_id` int(10) unsigned NOT NULL auto_increment,
droy27e97e02007-11-27 16:44:19 +000033 `project_id` varchar(100) NOT NULL,
droy44cb1ba2007-12-18 15:19:34 +000034 `version` varchar(64) NOT NULL,
droy27e97e02007-11-27 16:44:19 +000035 `name` text NOT NULL,
36 `is_active` tinyint(3) unsigned NOT NULL default '1',
37 PRIMARY KEY (`file_id`),
38 KEY `project_id` (`project_id`),
droyc081e862007-11-30 16:37:35 +000039 CONSTRAINT `files_ibfk_1` FOREIGN KEY (`project_id`,`version`) REFERENCES `project_versions` (`project_id`,`version`) ON UPDATE CASCADE
droy27e97e02007-11-27 16:44:19 +000040) ENGINE=InnoDB DEFAULT CHARSET=utf8;
41
42--
43-- Table structure for table `languages`
44--
45
46DROP TABLE IF EXISTS `languages`;
47CREATE TABLE `languages` (
48 `language_id` smallint(5) unsigned NOT NULL auto_increment,
droyc94a4522008-02-05 15:36:53 +000049 `iso_code` varchar(6) NOT NULL,
droy27e97e02007-11-27 16:44:19 +000050 `locale` varchar(12) default NULL,
51 `name` varchar(50) NOT NULL,
52 `is_active` tinyint(3) unsigned NOT NULL default '1',
53 PRIMARY KEY (`language_id`),
54 KEY `iso_code` (`iso_code`),
55 KEY `locale` (`locale`)
56) ENGINE=InnoDB DEFAULT CHARSET=utf8;
57
droy3bb0c962008-01-17 20:45:01 +000058
59
60--
61-- Table structure for table `map_files`
62--
63
64DROP TABLE IF EXISTS `map_files`;
65CREATE TABLE `map_files` (
66 `project_id` varchar(100) NOT NULL,
67 `version` varchar(64) NOT NULL,
68 `filename` varchar(100) NOT NULL,
69 `location` varchar(255) NOT NULL,
70 `is_active` tinyint(3) unsigned NOT NULL default '1',
71 PRIMARY KEY (`project_id`, `version`, `filename`),
72 CONSTRAINT `map_files_ibfk_1` FOREIGN KEY (`project_id`) REFERENCES `projects` (`project_id`) ON UPDATE CASCADE ON DELETE CASCADE
73) ENGINE=InnoDB DEFAULT CHARSET=utf8;
74
droy27e97e02007-11-27 16:44:19 +000075--
76-- Table structure for table `profiles`
77--
78
79DROP TABLE IF EXISTS `profiles`;
80CREATE TABLE `profiles` (
81 `userid` mediumint(9) NOT NULL auto_increment,
82 `login_name` varchar(255) NOT NULL default '',
83 `cryptpassword` varchar(128) default NULL,
84 `realname` varchar(255) NOT NULL default '',
85 `disabledtext` mediumtext NOT NULL,
86 `mybugslink` tinyint(4) NOT NULL default '1',
87 `extern_id` varchar(64) default NULL,
88 `disable_mail` tinyint(4) NOT NULL default '0',
89 PRIMARY KEY (`userid`),
90 UNIQUE KEY `profiles_login_name_idx` (`login_name`)
91) ENGINE=MyISAM DEFAULT CHARSET=latin1;
92
93--
94-- Table structure for table `projects`
95--
96
97DROP TABLE IF EXISTS `projects`;
98CREATE TABLE `projects` (
99 `project_id` varchar(100) NOT NULL,
100 `is_active` tinyint(3) unsigned NOT NULL default '1',
101 PRIMARY KEY (`project_id`)
102) ENGINE=InnoDB DEFAULT CHARSET=utf8;
103
droyc081e862007-11-30 16:37:35 +0000104DROP TABLE IF EXISTS `project_versions`;
105CREATE TABLE `project_versions` (
106 `project_id` varchar(100) NOT NULL,
droy44cb1ba2007-12-18 15:19:34 +0000107 `version` varchar(64) NOT NULL,
droyc081e862007-11-30 16:37:35 +0000108 `is_active` tinyint(3) unsigned NOT NULL default '1',
109 PRIMARY KEY (`project_id`, `version`),
110 CONSTRAINT `project_versions_ibfk_1` FOREIGN KEY (`project_id`) REFERENCES `projects` (`project_id`) ON UPDATE CASCADE ON DELETE CASCADE
111) ENGINE=InnoDB DEFAULT CHARSET=utf8;
112
droy27e97e02007-11-27 16:44:19 +0000113--
114-- Table structure for table `ratings`
115--
116
117DROP TABLE IF EXISTS `ratings`;
118CREATE TABLE `ratings` (
119 `translation_id` int(10) unsigned NOT NULL,
120 `userid` int(10) unsigned NOT NULL,
121 `rating` tinyint(3) unsigned NOT NULL default '0',
122 `created_on` datetime NOT NULL,
123 PRIMARY KEY (`translation_id`,`userid`),
124 CONSTRAINT `ratings_ibfk_1` FOREIGN KEY (`translation_id`) REFERENCES `translations` (`translation_id`) ON UPDATE CASCADE
125) ENGINE=InnoDB DEFAULT CHARSET=utf8;
126
127--
128-- Table structure for table `schema_info`
129--
130
131DROP TABLE IF EXISTS `schema_info`;
132CREATE TABLE `schema_info` (
133 `version` int(11) default NULL
134) ENGINE=MyISAM DEFAULT CHARSET=latin1;
135
136--
137-- Table structure for table `sessions`
138--
139
140DROP TABLE IF EXISTS `sessions`;
141CREATE TABLE `sessions` (
142 `id` int(11) unsigned NOT NULL auto_increment,
143 `userid` int(11) NOT NULL,
144 `gid` char(32) default NULL,
145 `subnet` char(15) default NULL,
146 `updated_at` datetime default NULL,
147 PRIMARY KEY (`id`),
148 KEY `gid` (`gid`),
149 KEY `userid` (`userid`)
150) ENGINE=InnoDB DEFAULT CHARSET=latin1;
151
152--
153-- Table structure for table `strings`
154--
155
156DROP TABLE IF EXISTS `strings`;
157CREATE TABLE `strings` (
158 `string_id` int(10) unsigned NOT NULL auto_increment,
159 `file_id` int(10) unsigned NOT NULL,
160 `name` text NOT NULL,
161 `value` text NOT NULL,
162 `userid` int(10) unsigned NOT NULL,
163 `created_on` datetime NOT NULL,
164 `is_active` tinyint(1) unsigned default NULL,
165 PRIMARY KEY (`string_id`),
166 KEY `file_id` (`file_id`),
167 KEY `userid` (`userid`),
168 CONSTRAINT `strings_ibfk_1` FOREIGN KEY (`file_id`) REFERENCES `files` (`file_id`) ON UPDATE CASCADE,
169 CONSTRAINT `strings_ibfk_2` FOREIGN KEY (`userid`) REFERENCES `users` (`userid`) ON UPDATE CASCADE
170) ENGINE=InnoDB DEFAULT CHARSET=utf8;
171
droy44cb1ba2007-12-18 15:19:34 +0000172
droy44cb1ba2007-12-18 15:19:34 +0000173DELIMITER ;;
174CREATE TRIGGER `upd_string` AFTER UPDATE ON `strings` FOR EACH ROW
175 BEGIN
176 IF(NEW.value <> OLD.value) THEN
177 UPDATE translations SET possibly_incorrect = 1 WHERE string_id = NEW.string_id;
178 END IF;
179 END;
180;;
181DELIMITER ;
182
183
184
droy27e97e02007-11-27 16:44:19 +0000185--
186-- Table structure for table `translation_archives`
187--
188
189DROP TABLE IF EXISTS `translation_archives`;
190CREATE TABLE `translation_archives` (
191 `translation_id` int(10) unsigned NOT NULL,
192 `string_id` int(10) unsigned NOT NULL,
193 `language_id` smallint(5) unsigned NOT NULL,
194 `version` int(10) unsigned NOT NULL default '1',
195 `value` text NOT NULL,
196 `is_active` tinyint(3) unsigned NOT NULL default '1',
197 `userid` int(10) unsigned NOT NULL,
198 `created_on` datetime NOT NULL,
199 PRIMARY KEY (`string_id`,`language_id`,`version`),
200 KEY `language_id` (`language_id`),
201 KEY `userid` (`userid`),
202 CONSTRAINT `translation_archives_ibfk_1` FOREIGN KEY (`string_id`) REFERENCES `strings` (`string_id`) ON UPDATE CASCADE,
203 CONSTRAINT `translation_archives_ibfk_2` FOREIGN KEY (`language_id`) REFERENCES `languages` (`language_id`) ON UPDATE CASCADE,
204 CONSTRAINT `translation_archives_ibfk_3` FOREIGN KEY (`userid`) REFERENCES `users` (`userid`) ON UPDATE CASCADE
205) ENGINE=InnoDB DEFAULT CHARSET=utf8;
206
207--
208-- Table structure for table `translations`
209--
210
211DROP TABLE IF EXISTS `translations`;
212CREATE TABLE `translations` (
213 `translation_id` int(10) unsigned NOT NULL auto_increment,
214 `string_id` int(10) unsigned NOT NULL,
215 `language_id` smallint(5) unsigned NOT NULL,
216 `version` int(10) unsigned NOT NULL default '1',
217 `value` text NOT NULL,
droy44cb1ba2007-12-18 15:19:34 +0000218 `possibly_incorrect` tinyint unsigned NOT NULL default '0',
droy27e97e02007-11-27 16:44:19 +0000219 `is_active` tinyint(3) unsigned NOT NULL default '1',
220 `userid` int(10) unsigned NOT NULL,
221 `created_on` datetime NOT NULL,
222 PRIMARY KEY (`string_id`,`language_id`,`version`),
223 KEY `translation_id` (`translation_id`),
224 KEY `language_id` (`language_id`),
225 KEY `userid` (`userid`),
226 CONSTRAINT `translations_ibfk_1` FOREIGN KEY (`string_id`) REFERENCES `strings` (`string_id`) ON UPDATE CASCADE,
227 CONSTRAINT `translations_ibfk_2` FOREIGN KEY (`language_id`) REFERENCES `languages` (`language_id`) ON UPDATE CASCADE,
228 CONSTRAINT `translations_ibfk_3` FOREIGN KEY (`userid`) REFERENCES `users` (`userid`) ON UPDATE CASCADE
229) ENGINE=InnoDB DEFAULT CHARSET=utf8;
230
231/*!50003 SET @OLD_SQL_MODE=@@SQL_MODE*/;
232DELIMITER ;;
233/*!50003 SET SESSION SQL_MODE="" */;;
234/*!50003 CREATE TRIGGER `ins_version` BEFORE INSERT ON `translations` FOR EACH ROW SET NEW.version =
droye4e2e332007-11-29 19:59:12 +0000235 (SELECT IFNULL(MAX(version),0)+1 FROM translations
droy8da30b32007-11-29 21:00:26 +0000236 WHERE string_id = NEW.string_id and language_id = NEW.language_id) */;;
droy27e97e02007-11-27 16:44:19 +0000237
238DELIMITER ;
239/*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE */;
240
241--
242-- Table structure for table `users`
243--
244
245DROP TABLE IF EXISTS `users`;
246CREATE TABLE `users` (
247 `userid` int(10) unsigned NOT NULL,
248 `username` varchar(256) NOT NULL default '',
249 `first_name` varchar(256) NOT NULL default '',
250 `last_name` varchar(256) NOT NULL default '',
251 `email` varchar(256) NOT NULL default '',
252 `primary_language_id` int(11) NOT NULL default '0',
253 `hours_per_week` int(11) NOT NULL default '0',
254 `password_hash` varchar(256) NOT NULL default '',
droy8da30b32007-11-29 21:00:26 +0000255 `is_committer` tinyint unsigned not null default 0,
droy27e97e02007-11-27 16:44:19 +0000256 `updated_on` date NOT NULL,
257 `updated_at` time NOT NULL,
258 `created_on` date NOT NULL,
259 `created_at` time NOT NULL,
260 PRIMARY KEY (`userid`),
261 KEY `primary_language_id` (`primary_language_id`)
262) ENGINE=InnoDB DEFAULT CHARSET=utf8;
droy97c86192007-11-28 22:00:22 +0000263
droy97c86192007-11-28 22:00:22 +0000264
265
droy27e97e02007-11-27 16:44:19 +0000266/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
267
268/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
269/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
270/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
271/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
272/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
273/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
274/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
275
droy6426bc02008-02-01 19:35:19 +0000276
277
278
279
280
281/*
282Babel data
283User: babel@eclipse.org
284pass: password
285*/
286
287insert into profiles set login_name = "test", cryptpassword = "", realname = "tester", disabledtext = false, mybugslink = 1, extern_id = 1, disable_mail = false;
288insert into users set userid = 1, username = "babel@eclipse.org",first_name="babel",last_name="fish",email="babel@eclipse.org",primary_language_id = "",password_hash = "HSD9a.ShTTdvo", is_committer = true;
289insert into projects set project_id = 'eclipse', is_active = 1 ;
290INSERT INTO `languages` VALUES (1,'en',NULL,'English',1),
291(2,'fr',NULL,'French',1),
292(3,'ja',NULL,'Japanese',1),
293(4,'de',NULL,'German',1),
294(5,'es',NULL,'Spanish',1),
295(7,'it',NULL,'Italian',1),
296(8,'ja',NULL,'Japanese',1),
297(9,'ko',NULL,'Korean',1),
298(10,'pt','Brazil','Portuguese',1),
299(11,'zh','Simplified','Chinese',1),
droyc94a4522008-02-05 15:36:53 +0000300(12,'zh_TW','Traditional','Chinese',1),
droy6426bc02008-02-01 19:35:19 +0000301(13,'cs',NULL,'Czech',1),
302(14,'hu',NULL,'Hungarian',1),
303(15,'pl',NULL,'Polish',1),
304(16,'ru',NULL,'Russian',1),
305(17,'da',NULL,'Russian',1),
306(18,'nl',NULL,'Dutch',1),
307(19,'fi',NULL,'Finnish',1),
308(20,'el',NULL,'Greek',1),
309(21,'no',NULL,'Norwegian',1),
310(22,'pt',NULL,'Portuguese',1),
311(23,'sv',NULL,'Swedish',1),
312(24,'tr',NULL,'Turkish',1),
313(25,'ar',NULL,'Arabic',1),
314(26,'he',NULL,'Hebrew',1);
droyc94a4522008-02-05 15:36:53 +0000315insert into languages set iso_code = 'hi', name = "Hindi";
droy6426bc02008-02-01 19:35:19 +0000316insert into project_versions set project_id = "eclipse", version = "3.4", is_active = 1;
317
318
319/* MAP INPUTS */
320insert into map_files values ("eclipse", "3.4", "ant.map", "http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.releng/maps/ant.map?view=co", 1);
321insert into map_files values ("eclipse", "3.4", "base.map", "http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.releng/maps/base.map?view=co", 1);
322insert into map_files values ("eclipse", "3.4", "compare.map", "http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.releng/maps/compare.map?view=co", 1);
323insert into map_files values ("eclipse", "3.4", "core-hpux.map", "http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.releng/maps/core-hpux.map?view=co", 1);
324insert into map_files values ("eclipse", "3.4", "core-macosx.map", "http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.releng/maps/core-macosx.map?view=co", 1);
325insert into map_files values ("eclipse", "3.4", "core-qnx.map","http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.releng/maps/core-qnx.map?view=co", 1);
326insert into map_files values ("eclipse", "3.4", "core-variables.map","http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.releng/maps/core-variables.map?view=co", 1);
327insert into map_files values ("eclipse", "3.4", "core.map","http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.releng/maps/core.map?view=co", 1);
328insert into map_files values ("eclipse", "3.4", "doc.map","http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.releng/maps/doc.map?view=co", 1);
329insert into map_files values ("eclipse", "3.4", "equinox-incubator.map", "http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.releng/maps/equinox-incubator.map?view=co", 1);
330insert into map_files values ("eclipse", "3.4", "feature.map", "http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.releng/maps/feature.map?view=co", 1);
331insert into map_files values ("eclipse", "3.4", "jdtapt.map", "http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.releng/maps/jdtapt.map?view=co", 1);
332insert into map_files values ("eclipse", "3.4", "jdtcore.map", "http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.releng/maps/jdtcore.map?view=co", 1);
333insert into map_files values ("eclipse", "3.4", "jdtdebug.map", "http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.releng/maps/jdtdebug.map?view=co", 1);
334insert into map_files values ("eclipse", "3.4", "jdtui.map", "http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.releng/maps/jdtui.map?view=co", 1);
335insert into map_files values ("eclipse", "3.4", "orbit.map", "http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.releng/maps/orbit.map?view=co", 1);
336insert into map_files values ("eclipse", "3.4", "pde.map", "http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.releng/maps/pde.map?view=co", 1);
337insert into map_files values ("eclipse", "3.4", "rcp.map", "http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.releng/maps/rcp.map?view=co", 1);
338insert into map_files values ("eclipse", "3.4", "releng.map", "http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.releng/maps/releng.map?view=co", 1);
339insert into map_files values ("eclipse", "3.4", "swt.map", "http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.releng/maps/swt.map?view=co", 1);
340insert into map_files values ("eclipse", "3.4", "team.map", "http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.releng/maps/team.map?view=co", 1);
341insert into map_files values ("eclipse", "3.4", "testframework.map", "http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.releng/maps/testframework.map?view=co", 1);
342insert into map_files values ("eclipse", "3.4", "text.map", "http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.releng/maps/text.map?view=co", 1);
343insert into map_files values ("eclipse", "3.4", "ui.map", "http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.releng/maps/ui.map?view=co", 1);
344insert into map_files values ("eclipse", "3.4", "update.map", "http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.releng/maps/update.map?view=co", 1);
345insert into map_files values ("eclipse", "3.4", "userassist.map", "http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.releng/maps/userassist.map?view=co", 1);