Fix mysql migrations. This is tested with an existing up to date schema,
and no schema. It should also work with a non up to date schema as well. Btw, meetings in which I can get code done are the right kind of meetings.0.6.0-stable
parent
7cdedcaf0e
commit
202a4bec13
|
@ -90,6 +90,7 @@ namespace OpenSim.Data.MySQL
|
|||
|
||||
m_log.Info("[REGION DB]: MySql - connecting: " + connectionstring);
|
||||
m_connection = new MySqlConnection(connectionstring);
|
||||
m_connection.Open();
|
||||
|
||||
// This actually does the roll forward assembly stuff
|
||||
Assembly assem = GetType().Assembly;
|
||||
|
|
|
@ -72,7 +72,7 @@ namespace OpenSim.Data.MySQL
|
|||
|
||||
// This actually does the roll forward assembly stuff
|
||||
Assembly assem = GetType().Assembly;
|
||||
Migration m = new Migration(database.Connection, assem, "AssetStore");
|
||||
Migration m = new Migration(database.Connection, assem, "InventoryStore");
|
||||
|
||||
// TODO: After rev 6000, remove this. People should have
|
||||
// been rolled onto the new migration code by then.
|
||||
|
|
|
@ -107,7 +107,7 @@ namespace OpenSim.Data.MySQL
|
|||
|
||||
// This actually does the roll forward assembly stuff
|
||||
Assembly assem = GetType().Assembly;
|
||||
Migration m = new Migration(database.Connection, assem, "AssetStore");
|
||||
Migration m = new Migration(database.Connection, assem, "UserStore");
|
||||
|
||||
// TODO: After rev 6000, remove this. People should have
|
||||
// been rolled onto the new migration code by then.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
BEGIN;
|
||||
|
||||
CREATE TABLE `assets` (
|
||||
`id` binary(16) NOT NULL,
|
||||
`name` varchar(64) NOT NULL,
|
||||
|
@ -8,4 +10,6 @@ CREATE TABLE `assets` (
|
|||
`temporary` tinyint(1) NOT NULL,
|
||||
`data` longblob NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
|
||||
|
||||
COMMIT;
|
|
@ -1,3 +1,5 @@
|
|||
BEGIN;
|
||||
|
||||
CREATE TABLE `inventoryfolders` (
|
||||
`folderID` varchar(36) NOT NULL default '',
|
||||
`agentID` varchar(36) default NULL,
|
||||
|
@ -8,7 +10,8 @@ CREATE TABLE `inventoryfolders` (
|
|||
PRIMARY KEY (`folderID`),
|
||||
KEY `owner` (`agentID`),
|
||||
KEY `parent` (`parentFolderID`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 2';
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `inventoryitems` (
|
||||
`inventoryID` varchar(36) NOT NULL default '',
|
||||
`assetID` varchar(36) default NULL,
|
||||
|
@ -32,4 +35,6 @@ CREATE TABLE `inventoryitems` (
|
|||
PRIMARY KEY (`inventoryID`),
|
||||
KEY `owner` (`avatarID`),
|
||||
KEY `folder` (`parentFolderID`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 3';
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
COMMIT;
|
|
@ -1,3 +1,5 @@
|
|||
BEGIN;
|
||||
|
||||
CREATE TABLE `prims` (
|
||||
`UUID` varchar(255) NOT NULL,
|
||||
`RegionUUID` varchar(255) default NULL,
|
||||
|
@ -46,7 +48,7 @@ CREATE TABLE `prims` (
|
|||
`SitTargetOrientY` float default NULL,
|
||||
`SitTargetOrientZ` float default NULL,
|
||||
PRIMARY KEY (`UUID`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
CREATE TABLE `primshapes` (
|
||||
`UUID` varchar(255) NOT NULL,
|
||||
|
@ -77,7 +79,7 @@ CREATE TABLE `primshapes` (
|
|||
`Texture` longblob,
|
||||
`ExtraParams` longblob,
|
||||
PRIMARY KEY (`UUID`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
CREATE TABLE `primitems` (
|
||||
`itemID` varchar(255) NOT NULL,
|
||||
|
@ -99,13 +101,13 @@ CREATE TABLE `primitems` (
|
|||
`everyonePermissions` int(11) default NULL,
|
||||
`groupPermissions` int(11) default NULL,
|
||||
PRIMARY KEY (`itemID`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
CREATE TABLE `terrain` (
|
||||
`RegionUUID` varchar(255) default NULL,
|
||||
`Revision` int(11) default NULL,
|
||||
`Heightfield` longblob
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
CREATE TABLE `land` (
|
||||
`UUID` varchar(255) NOT NULL,
|
||||
|
@ -141,10 +143,12 @@ CREATE TABLE `land` (
|
|||
`UserLookAtZ` float default NULL,
|
||||
`AuthbuyerID` varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000',
|
||||
PRIMARY KEY (`UUID`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 2'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `landaccesslist` (
|
||||
`LandUUID` varchar(255) default NULL,
|
||||
`AccessUUID` varchar(255) default NULL,
|
||||
`Flags` int(11) default NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
COMMIT;
|
|
@ -1,3 +1,5 @@
|
|||
BEGIN;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS=0;
|
||||
-- ----------------------------
|
||||
-- Table structure for agents
|
||||
|
@ -17,7 +19,7 @@ CREATE TABLE `agents` (
|
|||
PRIMARY KEY (`UUID`),
|
||||
UNIQUE KEY `session` (`sessionID`),
|
||||
UNIQUE KEY `ssession` (`secureSessionID`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- Create schema avatar_appearance
|
||||
--
|
||||
|
@ -54,10 +56,8 @@ CREATE TABLE `avatarappearance` (
|
|||
Underpants_Asset char(36) NOT NULL,
|
||||
Skirt_Item char(36) NOT NULL,
|
||||
Skirt_Asset char(36) NOT NULL,
|
||||
|
||||
|
||||
PRIMARY KEY (`Owner`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev.2';
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS=0;
|
||||
-- ----------------------------
|
||||
|
@ -69,7 +69,7 @@ CREATE TABLE `userfriends` (
|
|||
`friendPerms` INT NOT NULL,
|
||||
`datetimestamp` INT NOT NULL,
|
||||
UNIQUE KEY (`ownerID`, `friendID`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev.1';SET FOREIGN_KEY_CHECKS=0;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
-- ----------------------------
|
||||
-- Table structure for users
|
||||
-- ----------------------------
|
||||
|
@ -99,8 +99,9 @@ CREATE TABLE `users` (
|
|||
`webLoginKey` varchar(36) default NULL,
|
||||
PRIMARY KEY (`UUID`),
|
||||
UNIQUE KEY `usernames` (`username`,`lastname`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 2';
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records
|
||||
-- ----------------------------
|
||||
COMMIT;
|
Loading…
Reference in New Issue