fix typo in create index that caused the entire migration to fail.

put some drop table if exist clauses in here to hopefully let this
migration work for people that are in an intermediary broken state
right now.
0.6.0-stable
Sean Dague 2008-07-18 15:10:20 +00:00
parent aec5f0ceed
commit e2a3be254f
1 changed files with 12 additions and 1 deletions

View File

@ -1,15 +1,22 @@
drop table if exists `estate_groups`;
CREATE TABLE `estate_groups` ( CREATE TABLE `estate_groups` (
`EstateID` int(10) NOT NULL, `EstateID` int(10) NOT NULL,
`uuid` char(36) NOT NULL `uuid` char(36) NOT NULL
); );
drop table if exists `estate_managers`;
CREATE TABLE `estate_managers` ( CREATE TABLE `estate_managers` (
`EstateID` int(10) NOT NULL, `EstateID` int(10) NOT NULL,
`uuid` char(36) NOT NULL `uuid` char(36) NOT NULL
); );
drop table if exists `estate_map`;
CREATE TABLE `estate_map` ( CREATE TABLE `estate_map` (
`RegionID` char(36) NOT NULL default '00000000-0000-0000-0000-000000000000', `RegionID` char(36) NOT NULL default '00000000-0000-0000-0000-000000000000',
`EstateID` int(11) NOT NULL `EstateID` int(11) NOT NULL
); );
drop table if exists `estate_settings`;
CREATE TABLE `estate_settings` ( CREATE TABLE `estate_settings` (
`EstateID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, `EstateID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`EstateName` varchar(64) default NULL, `EstateName` varchar(64) default NULL,
@ -39,6 +46,8 @@ CREATE TABLE `estate_users` (
`EstateID` int(10) NOT NULL, `EstateID` int(10) NOT NULL,
`uuid` char(36) NOT NULL `uuid` char(36) NOT NULL
); );
drop table if exists `estateban`;
CREATE TABLE `estateban` ( CREATE TABLE `estateban` (
`EstateID` int(10) NOT NULL, `EstateID` int(10) NOT NULL,
`bannedUUID` varchar(36) NOT NULL, `bannedUUID` varchar(36) NOT NULL,
@ -46,6 +55,7 @@ CREATE TABLE `estateban` (
`bannedIpHostMask` varchar(16) NOT NULL, `bannedIpHostMask` varchar(16) NOT NULL,
`bannedNameMask` varchar(64) default NULL `bannedNameMask` varchar(64) default NULL
); );
drop table if exists `regionsettings`; drop table if exists `regionsettings`;
CREATE TABLE `regionsettings` ( CREATE TABLE `regionsettings` (
`regionUUID` char(36) NOT NULL, `regionUUID` char(36) NOT NULL,
@ -84,9 +94,10 @@ CREATE TABLE `regionsettings` (
`Sandbox` tinyint(4) NOT NULL, `Sandbox` tinyint(4) NOT NULL,
PRIMARY KEY (`regionUUID`) PRIMARY KEY (`regionUUID`)
); );
CREATE INDEX `estate_ban_estate_id` on `estateban`(`EstateID`); CREATE INDEX `estate_ban_estate_id` on `estateban`(`EstateID`);
CREATE INDEX `estate_groups_estate_id` on `estate_groups`(`EstateID`); CREATE INDEX `estate_groups_estate_id` on `estate_groups`(`EstateID`);
CREATE INDEX `estate_managers_estate_id` on `estate_managers`(`EstateID`); CREATE INDEX `estate_managers_estate_id` on `estate_managers`(`EstateID`);
CREATE INDEX `estate_map_estate_id` on `estate_map`(`EstateID`); CREATE INDEX `estate_map_estate_id` on `estate_map`(`EstateID`);
CREATE UNIQUE INDEX `estate_map_region)id` on `estate_map`(`RegionID`); CREATE UNIQUE INDEX `estate_map_region_id` on `estate_map`(`RegionID`);
CREATE INDEX `estate_users_estate_id` on `estate_users`(`EstateID`); CREATE INDEX `estate_users_estate_id` on `estate_users`(`EstateID`);