2 # script to update indexes on mysql (+other?) database
4 select '1. Dropping indexes' as ' ';
5 select 'Can''t drop messages indicate index already gone' as ' ';
7 ALTER TABLE `fpdb`.`Settings` DROP INDEX `id`;
8 ALTER TABLE `fpdb`.`Sites` DROP INDEX `id`;
9 ALTER TABLE `fpdb`.`Gametypes` DROP INDEX `id`;
10 ALTER TABLE `fpdb`.`Players` DROP INDEX `id`;
11 ALTER TABLE `fpdb`.`Autorates` DROP INDEX `id`;
12 ALTER TABLE `fpdb`.`Hands` DROP INDEX `id`;
13 ALTER TABLE `fpdb`.`BoardCards` DROP INDEX `id`;
14 ALTER TABLE `fpdb`.`TourneyTypes` DROP INDEX `id`;
15 ALTER TABLE `fpdb`.`Tourneys` DROP INDEX `id`;
16 ALTER TABLE `fpdb`.`TourneysPlayers` DROP INDEX `id`;
17 ALTER TABLE `fpdb`.`HandsPlayers` DROP INDEX `id`;
18 ALTER TABLE `fpdb`.`HandsActions` DROP INDEX `id`;
19 ALTER TABLE `fpdb`.`HudCache` DROP INDEX `id`;
21 select '2. Adding extra indexes on useful fields' as ' ';
22 select 'Duplicate key name messages indicate new indexes already there' as ' ';
24 ALTER TABLE `fpdb`.`tourneys` ADD INDEX `siteTourneyNo`(`siteTourneyNo`);
25 ALTER TABLE `fpdb`.`hands` ADD INDEX `siteHandNo`(`siteHandNo`);
26 ALTER TABLE `fpdb`.`players` ADD INDEX `name`(`name`);