Update:Developers/Database Changes
From MozillaWiki
Contents |
Database Changes [edit]
Remember to update remora.sql when you make schema changes!
To be run in production [edit]
3.4.3/3.4.4 [edit]
CREATE TABLE `text_search_summary` ( `id` int(11) NOT NULL, `locale` varchar(10) NOT NULL, `addontype` int(11) NOT NULL, `status` int(11) NOT NULL, `inactive` int(11) NOT NULL, `averagerating` varchar(255), `weeklydownloads` int(11) UNSIGNED , `name` text, `summary` text, `description` text, FULLTEXT KEY `name` (`name`,`summary`,`description`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `versions_summary` ( `addon_id` int(11) NOT NULL, `version_id` int(11) NOT NULL, `application_id` int(11), `created` DATETIME NOT NULL, `modified`DATETIME NOT NULL, `min` int(11) unsigned, `max` int(11) unsigned, INDEX (addon_id) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
This is for advanced search/full text search should also run the script: update-search-views.php in /bin to populate these tables. You might what to edit your my.conf file to set ft_min_word_len=2 for the smallest thing to index for full text search.
3.5 Changes [edit]
ALTER TABLE `addons_users` ADD `role` TINYINT( 2 ) UNSIGNED NOT NULL DEFAULT '5', ADD `listed` TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT '1', ADD `position` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0';
ALTER TABLE `addons` ADD `binary` TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT '0' AFTER `externalsoftware` ;
Ran In Production [edit]
- 2008-03-05 - fligtar - bug 408234
ALTER TABLE `logs_parsed` ADD `geo` VARCHAR( 10 ) NOT NULL AFTER `name` ; ALTER TABLE `logs_parsed` DROP INDEX `name` , ADD UNIQUE `name` ( `name` , `geo` ); UPDATE logs_parsed SET geo='SJ' WHERE name LIKE 'access_2007%'; UPDATE logs_parsed SET geo='NL' WHERE name NOT LIKE 'access_2007%';
- 2008-03-25 - lthomson - bug 424429
update `LUM_Discussion` set `Closed`=1;
- 2008-03-12 - morgamic - bug 417442
UPDATE `reviews` SET `rating` = `rating`/2 WHERE `rating` > 0 AND `rating` IS NOT NULL;
- 2008-03-14 - wenzel - bug 422636
SQL from Attachment 309392
- 2008-03-12 - wenzel - bug 416779
ALTER TABLE `addons` ADD `target_locale` VARCHAR( 255 ) NULL AFTER `nominationmessage` , ADD `locale_disambiguation` VARCHAR( 255 ) NULL AFTER `target_locale` ; ALTER TABLE `addons` ADD INDEX ( `target_locale` ); UPDATE `addons` SET `target_locale` = SUBSTRING_INDEX(`guid`, '@', 1) WHERE addontype_id = 3;
- 2008-03-13 - cpollett - bug 411363
ALTER TABLE `addons` ADD `supporturl` INT( 11 ) UNSIGNED NULL DEFAULT NULL AFTER `homepage` ; ALTER TABLE `addons` ADD INDEX ( `supporturl` ) ; ALTER TABLE `addons` ADD FOREIGN KEY (`supporturl`) REFERENCES `translations` (`id`); ALTER TABLE `addons` ADD `supportemail` INT( 11 ) UNSIGNED NULL DEFAULT NULL AFTER `homepage` ; ALTER TABLE `addons` ADD INDEX ( `supportemail` ) ; ALTER TABLE `addons` ADD FOREIGN KEY (`supportemail`) REFERENCES `translations` (`id`);
- 2008-03-10 - cpollett - bug 412645
ALTER TABLE `tags` ADD `weight` int(11) NOT NULL DEFAULT 0 AFTER application_id;
- 2008-03-07 - fligtar - CakePHP tinyint boolean bug fix
ALTER TABLE `addons` CHANGE `status` `status` TINYINT( 2 ) UNSIGNED NOT NULL DEFAULT '0'; ALTER TABLE `files` CHANGE `status` `status` TINYINT( 2 ) UNSIGNED NOT NULL DEFAULT '0';
- 2008-02-10 - fligtar - bug 416506
ALTER TABLE `addons` ADD `publicstats` TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT '0' AFTER `viewsource` ;
- 2008-02-10 - fligtar - bug 416625
INSERT INTO `config` (`key` , `value`) VALUES ('stats_disabled', '0');
- 2008-02-07 - morgamic - review count column
ALTER TABLE `addons` ADD `totalreviews` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0' AFTER `averagerating`;
- 2008-01-28 - fligtar - bug 406898
INSERT INTO `config` (`key` , `value`) VALUES('firefox_notice_version', ''), ('firefox_notice_url', '');
