Skip to content

Instantly share code, notes, and snippets.

@henare
Created April 5, 2011 03:27
Show Gist options
  • Save henare/902967 to your computer and use it in GitHub Desktop.
Save henare/902967 to your computer and use it in GitHub Desktop.
The database "migration" we need to run on production for EL-189
CREATE TABLE `category_election` (
`category_election_id` INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`category_id` INT( 11 ) NOT NULL ,
`election_id` INT( 11 ) NOT NULL
) ENGINE = MYISAM ;
INSERT INTO `category_election` (category_id, election_id) SELECT category_id, 1 FROM category;
INSERT INTO `category_election` (category_id, election_id) SELECT category_id, 2 FROM category;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment