Closed Bug 517103 Opened 15 years ago Closed 15 years ago

Run SQL patch on SUMO Staging

Categories

(mozilla.org Graveyard :: Server Operations, task)

task
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jsocol, Assigned: fox2mike)

Details

Need a bit more SQL run on stage:

https://bug505425.bugzilla.mozilla.org/attachment.cgi?id=400969

This one is blocking our QA guys, so as soon as you can get to it.

Thanks!
All these queries were fine : 

mysql> CREATE TABLE IF NOT EXISTS `tiki_question_fields` (
    ->   `id` int(11) NOT NULL auto_increment,
    ->   `section_id` int(11) NOT NULL,
    ->   `type` enum('text','hidden','checkbox','radio','select','textarea','textblock') NOT NULL default 'text',
    ->   `name` varchar(127) NOT NULL,
    ->   `value` text,
    ->   `label` varchar(255) default NULL,
    ->   `description` text,
    ->   `attributes` text,
    ->   `options` text,
    ->   `weight` int(11) NOT NULL default '10',
    ->   PRIMARY KEY  (`id`),
    ->   KEY `section_id` (`section_id`),
    ->   KEY `weight` (`weight`)
    -> ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=15 ;
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> INSERT INTO `tiki_question_fields` (`id`, `section_id`, `type`, `name`, `value`, `label`, `description`, `attributes`, `options`, `weight`) VALUES
    -> (1, 1, 'text', 'crash_id', '', 'Crash ID', 'You left the Crash ID empty. This is essential to help you solve your problem.', 'a:0:{}', 'a:0:{}', 10),
    -> (2, 1, 'select', 'crash_fatality', '', 'Crash fatality', '', 'a:0:{}', 'a:5:{i:1;s:9:"still low";i:2;s:10:"not so low";i:3;s:8:"annoying";i:4;s:8:"paranoid";i:5;s:5:"fatal";}', 10),
    -> (3, 1, 'hidden', 'crash_hidden_name', 'crash_hidden_value', '', '', 'a:0:{}', 'a:0:{}', 10),
    -> (4, 1, 'checkbox', 'my_checkbox_1', '', 'My first checkbox', '', 'a:0:{}', 'a:0:{}', 11),
    -> (5, 1, 'checkbox', 'my_checkbox_2', '', 'My second checkbox', '', 'a:0:{}', 'a:0:{}', 11),
    -> (6, 1, 'textarea', 'a_lot_of_text', '', 'Enter a lot of text', '', 'a:0:{}', 'a:0:{}', 50),
    -> (7, 1, 'textblock', 'block_of_text', '', 'Block of text heading', 'This is a block of text. Lorem ipsum dolor sit amet...', 'a:0:{}', 'a:0:{}', 10),
    -> (8, 1, 'radio', 'crash_radio', '1', 'Radio 1', '', 'a:0:{}', 'a:0:{}', 12),
    -> (9, 1, 'radio', 'crash_radio', '', 'Radio 2', '', 'a:0:{}', 'a:0:{}', 12),
    -> (13, 3, 'checkbox', 'admin', '1', 'My first checkbox', '', 'a:0:{}', 'a:0:{}', 10),
    -> (14, 3, 'text', 'my_text_input', 'text default', 'Text input', '', 'a:0:{}', 'a:0:{}', 11);
Query OK, 11 rows affected (0.01 sec)
Records: 11  Duplicates: 0  Warnings: 0

mysql> CREATE TABLE IF NOT EXISTS `tiki_question_sections` (
    ->   `id` int(11) NOT NULL auto_increment,
    ->   `label` varchar(255) NOT NULL,
    ->   `description` text,
    ->   `allow_continue` enum('1','0') default '1',
    ->   `weight` int(4) NOT NULL default '10',
    ->   PRIMARY KEY  (`id`),
    ->   KEY `weight` (`weight`)
    -> ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ;
Query OK, 0 rows affected, 1 warning (0.00 sec)

This one bailed :

mysql> INSERT INTO `tiki_question_sections` (`id`, `label`, `description`, `allow_continue`, `weight`) VALUES
    -> (1, 'Firefox crashes or closes unexpectedly', 'This is gonna show up on the second screen.', '1', 10),
    -> (4, 'Specific websites do not work', 'This doesn''t allow through.', '', 11),
    -> (3, 'Problems with settings, bookmarks, passwords or other data stored by Firefox', '', '1', 10);
ERROR 1062 (23000): Duplicate entry '4' for key 1

Suggestions?
Assignee: server-ops → shyam
This should fix that last one, thanks!

TRUNCATE TABLE tiki_question_sections;
INSERT INTO tiki_question_sections (label,description,allow_continue,weight) VALUES
('Firefox crashes or closes unexpectedly','This is gonna show up on the second screen.','1',10),
('Specific websites do not work','This doesn''t allow through.', '0', 11),
("Problems with settings, bookmarks, passwords or other data stored by Firefox','','1',10);
mysql> TRUNCATE TABLE tiki_question_sections;
Query OK, 0 rows affected (0.02 sec)
mysql> INSERT INTO tiki_question_sections (label,description,allow_continue,weight) VALUES ('Firefox crashes or closes unexpectedly','This is gonna show up on the second screen.','1',10), ('Specific websites do not work','This doesn''t allow through.', '0', 11),
    -> ('Problems with settings, bookmarks, passwords or other data stored by Firefox','','1',10);
Query OK, 3 rows affected (0.00 sec)
Records: 3  Duplicates: 0  Warnings: 0

Done.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Product: mozilla.org → mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.