Skip to content

Commit

Permalink
Move keys to separate statements.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexia committed May 8, 2015
1 parent 4c6e647 commit d80e282
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 20 deletions.
11 changes: 6 additions & 5 deletions install/sql/spritesheet_table_spritename.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ CREATE TABLE /*_*/spritename (
`values` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`edited` int(14) NOT NULL DEFAULT '0',
`deleted` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`spritename_id`),
UNIQUE KEY `spritesheet_id_name` (`spritesheet_id`,`name`),
KEY `type` (`type`),
KEY `edited` (`edited`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
PRIMARY KEY (`spritename_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

ALTER TABLE /*_*/spritename ADD UNIQUE `spritesheet_id_name` (`spritesheet_id`,`name`),
ADD INDEX `type` (`type`),
ADD INDEX `edited` (`edited`);
13 changes: 7 additions & 6 deletions install/sql/spritesheet_table_spritename_rev.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ CREATE TABLE /*_*/spritename_rev (
`values` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`edited` int(14) NOT NULL DEFAULT '0',
`deleted` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`spritename_rev_id`),
KEY `spritename_id` (`spritename_id`),
KEY `spritesheet_id_name` (`spritesheet_id`,`name`),
KEY `type` (`type`),
KEY `edited` (`edited`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
PRIMARY KEY (`spritename_rev_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

ALTER TABLE /*_*/spritename_rev ADD INDEX `spritename_id` (`spritename_id`),
ADD INDEX `spritesheet_id_name` (`spritesheet_id`,`name`),
ADD INDEX `type` (`type`),
ADD INDEX `edited` (`edited`);
9 changes: 5 additions & 4 deletions install/sql/spritesheet_table_spritesheet.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ CREATE TABLE /*_*/spritesheet (
`rows` int(11) NOT NULL,
`inset` int(11) NOT NULL,
`edited` int(14) NOT NULL DEFAULT '0',
PRIMARY KEY (`spritesheet_id`),
UNIQUE KEY `title` (`title`),
KEY `edited` (`edited`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
PRIMARY KEY (`spritesheet_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

ALTER TABLE /*_*/spritesheet ADD UNIQUE `title` (`title`),
ADD INDEX `edited` (`edited`);
11 changes: 6 additions & 5 deletions install/sql/spritesheet_table_spritesheet_rev.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ CREATE TABLE /*_*/spritesheet_rev (
`rows` int(11) NOT NULL,
`inset` int(11) NOT NULL,
`edited` int(14) NOT NULL DEFAULT '0',
PRIMARY KEY (`spritesheet_rev_id`),
KEY `spritesheet_id` (`spritesheet_id`),
KEY `title` (`title`),
KEY `edited` (`edited`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
PRIMARY KEY (`spritesheet_rev_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

ALTER TABLE /*_*/spritesheet_rev ADD INDEX `spritesheet_id` (`spritesheet_id`),
ADD INDEX `title` (`title`),
ADD INDEX `edited` (`edited`);

0 comments on commit d80e282

Please sign in to comment.