droy | 27e97e0 | 2007-11-27 16:44:19 +0000 | [diff] [blame] | 1 | -- 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 | |
droy | d0a9b1a | 2008-01-29 19:51:46 +0000 | [diff] [blame] | 18 | DROP TABLE IF EXISTS event_log; |
droy | 3e7f3a8 | 2007-11-29 19:35:51 +0000 | [diff] [blame] | 19 | CREATE 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; |
droy | 27e97e0 | 2007-11-27 16:44:19 +0000 | [diff] [blame] | 29 | |
droy | 5d4b64c | 2008-02-29 15:22:10 +0000 | [diff] [blame] | 30 | DROP TABLE IF EXISTS `file_progress`; |
| 31 | CREATE TABLE `file_progress` ( |
| 32 | `file_id` int(10) unsigned NOT NULL, |
| 33 | `language_id` smallint(5) unsigned NOT NULL, |
| 34 | `pct_complete` float NOT NULL, |
| 35 | PRIMARY KEY (`file_id`, `language_id`), |
| 36 | CONSTRAINT `file_progress_ibfk_1` FOREIGN KEY (`file_id`) REFERENCES `files` (`file_id`) ON UPDATE CASCADE ON DELETE CASCADE, |
| 37 | CONSTRAINT `file_progress_ibfk_2` FOREIGN KEY (`language_id`) REFERENCES `languages` (`language_id`) ON UPDATE CASCADE ON DELETE CASCADE |
| 38 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 39 | |
droy | 27e97e0 | 2007-11-27 16:44:19 +0000 | [diff] [blame] | 40 | DROP TABLE IF EXISTS `files`; |
| 41 | CREATE TABLE `files` ( |
droy | e5c9981 | 2007-11-28 21:36:51 +0000 | [diff] [blame] | 42 | `file_id` int(10) unsigned NOT NULL auto_increment, |
droy | 27e97e0 | 2007-11-27 16:44:19 +0000 | [diff] [blame] | 43 | `project_id` varchar(100) NOT NULL, |
droy | 44cb1ba | 2007-12-18 15:19:34 +0000 | [diff] [blame] | 44 | `version` varchar(64) NOT NULL, |
droy | 27e97e0 | 2007-11-27 16:44:19 +0000 | [diff] [blame] | 45 | `name` text NOT NULL, |
| 46 | `is_active` tinyint(3) unsigned NOT NULL default '1', |
| 47 | PRIMARY KEY (`file_id`), |
| 48 | KEY `project_id` (`project_id`), |
droy | c081e86 | 2007-11-30 16:37:35 +0000 | [diff] [blame] | 49 | CONSTRAINT `files_ibfk_1` FOREIGN KEY (`project_id`,`version`) REFERENCES `project_versions` (`project_id`,`version`) ON UPDATE CASCADE |
droy | 27e97e0 | 2007-11-27 16:44:19 +0000 | [diff] [blame] | 50 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
droy | 27e97e0 | 2007-11-27 16:44:19 +0000 | [diff] [blame] | 51 | -- |
| 52 | -- Table structure for table `languages` |
| 53 | -- |
| 54 | |
| 55 | DROP TABLE IF EXISTS `languages`; |
| 56 | CREATE TABLE `languages` ( |
| 57 | `language_id` smallint(5) unsigned NOT NULL auto_increment, |
droy | c94a452 | 2008-02-05 15:36:53 +0000 | [diff] [blame] | 58 | `iso_code` varchar(6) NOT NULL, |
droy | 27e97e0 | 2007-11-27 16:44:19 +0000 | [diff] [blame] | 59 | `locale` varchar(12) default NULL, |
| 60 | `name` varchar(50) NOT NULL, |
| 61 | `is_active` tinyint(3) unsigned NOT NULL default '1', |
| 62 | PRIMARY KEY (`language_id`), |
| 63 | KEY `iso_code` (`iso_code`), |
| 64 | KEY `locale` (`locale`) |
| 65 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 66 | |
droy | 3bb0c96 | 2008-01-17 20:45:01 +0000 | [diff] [blame] | 67 | |
| 68 | |
| 69 | -- |
| 70 | -- Table structure for table `map_files` |
| 71 | -- |
| 72 | |
| 73 | DROP TABLE IF EXISTS `map_files`; |
| 74 | CREATE TABLE `map_files` ( |
| 75 | `project_id` varchar(100) NOT NULL, |
| 76 | `version` varchar(64) NOT NULL, |
| 77 | `filename` varchar(100) NOT NULL, |
| 78 | `location` varchar(255) NOT NULL, |
| 79 | `is_active` tinyint(3) unsigned NOT NULL default '1', |
| 80 | PRIMARY KEY (`project_id`, `version`, `filename`), |
| 81 | CONSTRAINT `map_files_ibfk_1` FOREIGN KEY (`project_id`) REFERENCES `projects` (`project_id`) ON UPDATE CASCADE ON DELETE CASCADE |
| 82 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 83 | |
droy | 27e97e0 | 2007-11-27 16:44:19 +0000 | [diff] [blame] | 84 | -- |
| 85 | -- Table structure for table `profiles` |
| 86 | -- |
| 87 | |
| 88 | DROP TABLE IF EXISTS `profiles`; |
| 89 | CREATE TABLE `profiles` ( |
| 90 | `userid` mediumint(9) NOT NULL auto_increment, |
| 91 | `login_name` varchar(255) NOT NULL default '', |
| 92 | `cryptpassword` varchar(128) default NULL, |
| 93 | `realname` varchar(255) NOT NULL default '', |
| 94 | `disabledtext` mediumtext NOT NULL, |
| 95 | `mybugslink` tinyint(4) NOT NULL default '1', |
| 96 | `extern_id` varchar(64) default NULL, |
| 97 | `disable_mail` tinyint(4) NOT NULL default '0', |
| 98 | PRIMARY KEY (`userid`), |
| 99 | UNIQUE KEY `profiles_login_name_idx` (`login_name`) |
| 100 | ) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
| 101 | |
| 102 | -- |
| 103 | -- Table structure for table `projects` |
| 104 | -- |
| 105 | |
| 106 | DROP TABLE IF EXISTS `projects`; |
| 107 | CREATE TABLE `projects` ( |
| 108 | `project_id` varchar(100) NOT NULL, |
| 109 | `is_active` tinyint(3) unsigned NOT NULL default '1', |
| 110 | PRIMARY KEY (`project_id`) |
| 111 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 112 | |
droy | c081e86 | 2007-11-30 16:37:35 +0000 | [diff] [blame] | 113 | DROP TABLE IF EXISTS `project_versions`; |
| 114 | CREATE TABLE `project_versions` ( |
| 115 | `project_id` varchar(100) NOT NULL, |
droy | 44cb1ba | 2007-12-18 15:19:34 +0000 | [diff] [blame] | 116 | `version` varchar(64) NOT NULL, |
droy | c081e86 | 2007-11-30 16:37:35 +0000 | [diff] [blame] | 117 | `is_active` tinyint(3) unsigned NOT NULL default '1', |
| 118 | PRIMARY KEY (`project_id`, `version`), |
| 119 | CONSTRAINT `project_versions_ibfk_1` FOREIGN KEY (`project_id`) REFERENCES `projects` (`project_id`) ON UPDATE CASCADE ON DELETE CASCADE |
| 120 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 121 | |
droy | 27e97e0 | 2007-11-27 16:44:19 +0000 | [diff] [blame] | 122 | -- |
| 123 | -- Table structure for table `ratings` |
| 124 | -- |
| 125 | |
| 126 | DROP TABLE IF EXISTS `ratings`; |
| 127 | CREATE TABLE `ratings` ( |
| 128 | `translation_id` int(10) unsigned NOT NULL, |
| 129 | `userid` int(10) unsigned NOT NULL, |
| 130 | `rating` tinyint(3) unsigned NOT NULL default '0', |
| 131 | `created_on` datetime NOT NULL, |
| 132 | PRIMARY KEY (`translation_id`,`userid`), |
| 133 | CONSTRAINT `ratings_ibfk_1` FOREIGN KEY (`translation_id`) REFERENCES `translations` (`translation_id`) ON UPDATE CASCADE |
| 134 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 135 | |
| 136 | -- |
| 137 | -- Table structure for table `schema_info` |
| 138 | -- |
| 139 | |
| 140 | DROP TABLE IF EXISTS `schema_info`; |
| 141 | CREATE TABLE `schema_info` ( |
| 142 | `version` int(11) default NULL |
| 143 | ) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
| 144 | |
| 145 | -- |
| 146 | -- Table structure for table `sessions` |
| 147 | -- |
| 148 | |
| 149 | DROP TABLE IF EXISTS `sessions`; |
| 150 | CREATE TABLE `sessions` ( |
| 151 | `id` int(11) unsigned NOT NULL auto_increment, |
| 152 | `userid` int(11) NOT NULL, |
| 153 | `gid` char(32) default NULL, |
| 154 | `subnet` char(15) default NULL, |
| 155 | `updated_at` datetime default NULL, |
| 156 | PRIMARY KEY (`id`), |
| 157 | KEY `gid` (`gid`), |
| 158 | KEY `userid` (`userid`) |
| 159 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; |
| 160 | |
| 161 | -- |
| 162 | -- Table structure for table `strings` |
| 163 | -- |
| 164 | |
| 165 | DROP TABLE IF EXISTS `strings`; |
| 166 | CREATE TABLE `strings` ( |
| 167 | `string_id` int(10) unsigned NOT NULL auto_increment, |
| 168 | `file_id` int(10) unsigned NOT NULL, |
| 169 | `name` text NOT NULL, |
| 170 | `value` text NOT NULL, |
| 171 | `userid` int(10) unsigned NOT NULL, |
| 172 | `created_on` datetime NOT NULL, |
| 173 | `is_active` tinyint(1) unsigned default NULL, |
| 174 | PRIMARY KEY (`string_id`), |
| 175 | KEY `file_id` (`file_id`), |
| 176 | KEY `userid` (`userid`), |
| 177 | CONSTRAINT `strings_ibfk_1` FOREIGN KEY (`file_id`) REFERENCES `files` (`file_id`) ON UPDATE CASCADE, |
| 178 | CONSTRAINT `strings_ibfk_2` FOREIGN KEY (`userid`) REFERENCES `users` (`userid`) ON UPDATE CASCADE |
| 179 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 180 | |
droy | 44cb1ba | 2007-12-18 15:19:34 +0000 | [diff] [blame] | 181 | |
droy | 44cb1ba | 2007-12-18 15:19:34 +0000 | [diff] [blame] | 182 | DELIMITER ;; |
| 183 | CREATE TRIGGER `upd_string` AFTER UPDATE ON `strings` FOR EACH ROW |
| 184 | BEGIN |
| 185 | IF(NEW.value <> OLD.value) THEN |
| 186 | UPDATE translations SET possibly_incorrect = 1 WHERE string_id = NEW.string_id; |
| 187 | END IF; |
| 188 | END; |
| 189 | ;; |
| 190 | DELIMITER ; |
| 191 | |
| 192 | |
| 193 | |
droy | 27e97e0 | 2007-11-27 16:44:19 +0000 | [diff] [blame] | 194 | -- |
| 195 | -- Table structure for table `translation_archives` |
| 196 | -- |
| 197 | |
| 198 | DROP TABLE IF EXISTS `translation_archives`; |
| 199 | CREATE TABLE `translation_archives` ( |
| 200 | `translation_id` int(10) unsigned NOT NULL, |
| 201 | `string_id` int(10) unsigned NOT NULL, |
| 202 | `language_id` smallint(5) unsigned NOT NULL, |
| 203 | `version` int(10) unsigned NOT NULL default '1', |
| 204 | `value` text NOT NULL, |
| 205 | `is_active` tinyint(3) unsigned NOT NULL default '1', |
| 206 | `userid` int(10) unsigned NOT NULL, |
| 207 | `created_on` datetime NOT NULL, |
| 208 | PRIMARY KEY (`string_id`,`language_id`,`version`), |
| 209 | KEY `language_id` (`language_id`), |
| 210 | KEY `userid` (`userid`), |
| 211 | CONSTRAINT `translation_archives_ibfk_1` FOREIGN KEY (`string_id`) REFERENCES `strings` (`string_id`) ON UPDATE CASCADE, |
| 212 | CONSTRAINT `translation_archives_ibfk_2` FOREIGN KEY (`language_id`) REFERENCES `languages` (`language_id`) ON UPDATE CASCADE, |
| 213 | CONSTRAINT `translation_archives_ibfk_3` FOREIGN KEY (`userid`) REFERENCES `users` (`userid`) ON UPDATE CASCADE |
| 214 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 215 | |
| 216 | -- |
| 217 | -- Table structure for table `translations` |
| 218 | -- |
| 219 | |
| 220 | DROP TABLE IF EXISTS `translations`; |
| 221 | CREATE TABLE `translations` ( |
| 222 | `translation_id` int(10) unsigned NOT NULL auto_increment, |
| 223 | `string_id` int(10) unsigned NOT NULL, |
| 224 | `language_id` smallint(5) unsigned NOT NULL, |
| 225 | `version` int(10) unsigned NOT NULL default '1', |
| 226 | `value` text NOT NULL, |
droy | 44cb1ba | 2007-12-18 15:19:34 +0000 | [diff] [blame] | 227 | `possibly_incorrect` tinyint unsigned NOT NULL default '0', |
droy | 27e97e0 | 2007-11-27 16:44:19 +0000 | [diff] [blame] | 228 | `is_active` tinyint(3) unsigned NOT NULL default '1', |
| 229 | `userid` int(10) unsigned NOT NULL, |
| 230 | `created_on` datetime NOT NULL, |
| 231 | PRIMARY KEY (`string_id`,`language_id`,`version`), |
| 232 | KEY `translation_id` (`translation_id`), |
| 233 | KEY `language_id` (`language_id`), |
| 234 | KEY `userid` (`userid`), |
| 235 | CONSTRAINT `translations_ibfk_1` FOREIGN KEY (`string_id`) REFERENCES `strings` (`string_id`) ON UPDATE CASCADE, |
| 236 | CONSTRAINT `translations_ibfk_2` FOREIGN KEY (`language_id`) REFERENCES `languages` (`language_id`) ON UPDATE CASCADE, |
| 237 | CONSTRAINT `translations_ibfk_3` FOREIGN KEY (`userid`) REFERENCES `users` (`userid`) ON UPDATE CASCADE |
| 238 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 239 | |
droy | 5d4b64c | 2008-02-29 15:22:10 +0000 | [diff] [blame] | 240 | SET @OLD_SQL_MODE=@@SQL_MODE; |
droy | 27e97e0 | 2007-11-27 16:44:19 +0000 | [diff] [blame] | 241 | DELIMITER ;; |
| 242 | /*!50003 SET SESSION SQL_MODE="" */;; |
droy | 5d4b64c | 2008-02-29 15:22:10 +0000 | [diff] [blame] | 243 | DROP TRIGGER `ins_version`;; |
droy | 27e97e0 | 2007-11-27 16:44:19 +0000 | [diff] [blame] | 244 | |
droy | 5d4b64c | 2008-02-29 15:22:10 +0000 | [diff] [blame] | 245 | /* This trigger sets the version to max(version) + 1. It also updates the file_progress table */ |
| 246 | /* (COUNT(t.string_id) + 1) because it's a BEFORE INSERT trigger, the translated str is not in the DB yet */ |
| 247 | /* and without the +1 the percent would always be "one behind" */ |
| 248 | CREATE TRIGGER `ins_version` BEFORE INSERT ON `translations` FOR EACH ROW BEGIN |
| 249 | SET NEW.version = |
| 250 | (SELECT IFNULL(MAX(version),0)+1 FROM translations |
| 251 | WHERE string_id = NEW.string_id and language_id = NEW.language_id); |
| 252 | |
| 253 | DELETE FROM file_progress where file_id = (SELECT file_id FROM strings WHERE string_id = NEW.string_id) |
| 254 | AND language_id = NEW.language_id; |
| 255 | |
| 256 | INSERT INTO file_progress SET file_id = (SELECT file_id FROM strings WHERE string_id = NEW.string_id), |
| 257 | language_id = NEW.language_id, |
| 258 | pct_complete = ( |
| 259 | SELECT IF(COUNT(s.string_id) > 0, (COUNT(t.string_id) + 1)/COUNT(s.string_id)*100,0) AS translate_percent |
| 260 | FROM files AS f |
| 261 | LEFT JOIN strings AS s ON s.file_id = f.file_id |
| 262 | LEFT JOIN translations AS t ON (s.string_id = t.string_id |
| 263 | AND t.language_id = NEW.language_id AND t.is_active = 1) |
| 264 | WHERE f.file_id = (SELECT file_id FROM strings WHERE string_id = NEW.string_id) |
| 265 | ); |
| 266 | END; |
| 267 | ;; |
droy | 27e97e0 | 2007-11-27 16:44:19 +0000 | [diff] [blame] | 268 | DELIMITER ; |
| 269 | /*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE */; |
| 270 | |
| 271 | -- |
| 272 | -- Table structure for table `users` |
| 273 | -- |
| 274 | |
| 275 | DROP TABLE IF EXISTS `users`; |
| 276 | CREATE TABLE `users` ( |
| 277 | `userid` int(10) unsigned NOT NULL, |
| 278 | `username` varchar(256) NOT NULL default '', |
| 279 | `first_name` varchar(256) NOT NULL default '', |
| 280 | `last_name` varchar(256) NOT NULL default '', |
| 281 | `email` varchar(256) NOT NULL default '', |
| 282 | `primary_language_id` int(11) NOT NULL default '0', |
| 283 | `hours_per_week` int(11) NOT NULL default '0', |
| 284 | `password_hash` varchar(256) NOT NULL default '', |
droy | 8da30b3 | 2007-11-29 21:00:26 +0000 | [diff] [blame] | 285 | `is_committer` tinyint unsigned not null default 0, |
droy | 27e97e0 | 2007-11-27 16:44:19 +0000 | [diff] [blame] | 286 | `updated_on` date NOT NULL, |
| 287 | `updated_at` time NOT NULL, |
| 288 | `created_on` date NOT NULL, |
| 289 | `created_at` time NOT NULL, |
| 290 | PRIMARY KEY (`userid`), |
| 291 | KEY `primary_language_id` (`primary_language_id`) |
| 292 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
droy | 97c8619 | 2007-11-28 22:00:22 +0000 | [diff] [blame] | 293 | |
droy | 97c8619 | 2007-11-28 22:00:22 +0000 | [diff] [blame] | 294 | |
| 295 | |
droy | 27e97e0 | 2007-11-27 16:44:19 +0000 | [diff] [blame] | 296 | /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; |
| 297 | |
| 298 | /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; |
| 299 | /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; |
| 300 | /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; |
| 301 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; |
| 302 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; |
| 303 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; |
| 304 | /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; |
| 305 | |
droy | 6426bc0 | 2008-02-01 19:35:19 +0000 | [diff] [blame] | 306 | |
| 307 | |
| 308 | |
| 309 | |
| 310 | |
| 311 | /* |
| 312 | Babel data |
| 313 | User: babel@eclipse.org |
| 314 | pass: password |
| 315 | */ |
| 316 | |
| 317 | insert into profiles set login_name = "test", cryptpassword = "", realname = "tester", disabledtext = false, mybugslink = 1, extern_id = 1, disable_mail = false; |
| 318 | insert 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; |
| 319 | insert into projects set project_id = 'eclipse', is_active = 1 ; |
| 320 | INSERT INTO `languages` VALUES (1,'en',NULL,'English',1), |
| 321 | (2,'fr',NULL,'French',1), |
| 322 | (3,'ja',NULL,'Japanese',1), |
| 323 | (4,'de',NULL,'German',1), |
| 324 | (5,'es',NULL,'Spanish',1), |
| 325 | (7,'it',NULL,'Italian',1), |
| 326 | (8,'ja',NULL,'Japanese',1), |
| 327 | (9,'ko',NULL,'Korean',1), |
kitlo | a2b243f | 2008-03-05 14:55:26 +0000 | [diff] [blame] | 328 | (10,'pt_BR','Brazilian','Portuguese',1), |
droy | 6426bc0 | 2008-02-01 19:35:19 +0000 | [diff] [blame] | 329 | (11,'zh','Simplified','Chinese',1), |
droy | c94a452 | 2008-02-05 15:36:53 +0000 | [diff] [blame] | 330 | (12,'zh_TW','Traditional','Chinese',1), |
droy | 6426bc0 | 2008-02-01 19:35:19 +0000 | [diff] [blame] | 331 | (13,'cs',NULL,'Czech',1), |
| 332 | (14,'hu',NULL,'Hungarian',1), |
| 333 | (15,'pl',NULL,'Polish',1), |
| 334 | (16,'ru',NULL,'Russian',1), |
kitlo | cba1790 | 2008-02-14 19:16:02 +0000 | [diff] [blame] | 335 | (17,'da',NULL,'Danish',1), |
droy | 6426bc0 | 2008-02-01 19:35:19 +0000 | [diff] [blame] | 336 | (18,'nl',NULL,'Dutch',1), |
| 337 | (19,'fi',NULL,'Finnish',1), |
| 338 | (20,'el',NULL,'Greek',1), |
| 339 | (21,'no',NULL,'Norwegian',1), |
| 340 | (22,'pt',NULL,'Portuguese',1), |
| 341 | (23,'sv',NULL,'Swedish',1), |
| 342 | (24,'tr',NULL,'Turkish',1), |
| 343 | (25,'ar',NULL,'Arabic',1), |
kitlo | cba1790 | 2008-02-14 19:16:02 +0000 | [diff] [blame] | 344 | (26,'iw',NULL,'Hebrew',1); |
droy | c94a452 | 2008-02-05 15:36:53 +0000 | [diff] [blame] | 345 | insert into languages set iso_code = 'hi', name = "Hindi"; |
droy | 99907e4 | 2008-03-05 21:59:21 +0000 | [diff] [blame] | 346 | insert into languages set iso_code = 'ro', name = "Romanian"; |
droy | 6426bc0 | 2008-02-01 19:35:19 +0000 | [diff] [blame] | 347 | insert into project_versions set project_id = "eclipse", version = "3.4", is_active = 1; |
| 348 | |
| 349 | |
| 350 | /* MAP INPUTS */ |
| 351 | insert 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); |
| 352 | insert 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); |
| 353 | insert 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); |
| 354 | insert 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); |
| 355 | insert 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); |
| 356 | insert 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); |
| 357 | insert 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); |
| 358 | insert 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); |
| 359 | insert 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); |
| 360 | insert 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); |
| 361 | insert 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); |
| 362 | insert 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); |
| 363 | insert 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); |
| 364 | insert 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); |
| 365 | insert 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); |
| 366 | insert 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); |
| 367 | insert 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); |
| 368 | insert 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); |
| 369 | insert 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); |
| 370 | insert 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); |
| 371 | insert 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); |
| 372 | insert 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); |
| 373 | insert 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); |
| 374 | insert 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); |
| 375 | insert 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); |
droy | 5d4b64c | 2008-02-29 15:22:10 +0000 | [diff] [blame] | 376 | insert 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); |
droy | bafb7c4 | 2008-02-29 18:24:38 +0000 | [diff] [blame] | 377 | |
| 378 | /* populate file_progress table */ |
| 379 | truncate table file_progress; |
| 380 | INSERT INTO file_progress |
| 381 | select f.file_id, l.language_id, IF(COUNT(s.string_id) > 0, COUNT(t.string_id)/COUNT(s.string_id)*100,0) AS translate_percent |
| 382 | FROM files AS f |
| 383 | INNER JOIN languages as l ON l.is_active = 1 |
| 384 | LEFT JOIN strings as s ON s.file_id = f.file_id |
| 385 | LEFT JOIN translations AS t ON (s.string_id = t.string_id |
| 386 | AND t.language_id = l.language_id AND t.is_active = 1) |
| 387 | WHERE f.is_active = 1 |
| 388 | GROUP BY f.file_id, l.language_id; |
droy | e3c71a6 | 2008-03-03 14:40:55 +0000 | [diff] [blame] | 389 | DELETE FROM file_progress WHERE pct_complete = 0; |