diff options
author | Charles Krinke | 2009-01-12 20:14:39 +0000 |
---|---|---|
committer | Charles Krinke | 2009-01-12 20:14:39 +0000 |
commit | c00c855cc5decf73d598af5d74a2ef57c547efd3 (patch) | |
tree | 03a6e3622db531537c2cfb47a99acd5edf4fe6b7 /OpenSim/Data/NHibernate/Resources/MySQLDialect/001_InventoryStore.sql | |
parent | * Separate starting a client thread into a separate Start() method (which mat... (diff) | |
download | opensim-SC_OLD-c00c855cc5decf73d598af5d74a2ef57c547efd3.zip opensim-SC_OLD-c00c855cc5decf73d598af5d74a2ef57c547efd3.tar.gz opensim-SC_OLD-c00c855cc5decf73d598af5d74a2ef57c547efd3.tar.bz2 opensim-SC_OLD-c00c855cc5decf73d598af5d74a2ef57c547efd3.tar.xz |
Thank you kindly, Tlaukkan (Tommil) for a patch that:
Cleaned up schema creation scripts of MySQL to compliant form and created
SQLite scripts from them. In future it would be optimal if scripts from
different databases could be generated from MySQL scripts to ensure optimal
consistency between schemas of different databases. Did not yet review
column names. ID columns seem to have variety in naming which can be confusing.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Data/NHibernate/Resources/MySQLDialect/001_InventoryStore.sql | 74 |
1 files changed, 36 insertions, 38 deletions
diff --git a/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_InventoryStore.sql b/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_InventoryStore.sql index 80afaa0..13d8cf6 100644 --- a/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_InventoryStore.sql +++ b/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_InventoryStore.sql | |||
@@ -1,41 +1,39 @@ | |||
1 | START TRANSACTION; | 1 | CREATE TABLE InventoryFolders ( |
2 | ID VARCHAR(36) NOT NULL, | ||
3 | Type SMALLINT DEFAULT NULL, | ||
4 | Version SMALLINT DEFAULT NULL, | ||
5 | ParentID VARCHAR(36) DEFAULT NULL, | ||
6 | Owner VARCHAR(36) DEFAULT NULL, | ||
7 | Name VARCHAR(64) DEFAULT NULL, | ||
8 | PRIMARY KEY (ID) | ||
9 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1'; | ||
2 | 10 | ||
3 | CREATE TABLE `InventoryFolders` ( | 11 | CREATE INDEX InventoryFoldersOwnerIdIndex ON InventoryFolders (Owner); |
4 | `ID` char(36) NOT NULL, | 12 | CREATE INDEX InventoryFoldersParentIdIndex ON InventoryFolders (ParentID); |
5 | `Type` int(11) default NULL, | ||
6 | `Version` int(11) default NULL, | ||
7 | `ParentID` char(36) default NULL, | ||
8 | `Owner` char(36) default NULL, | ||
9 | `Name` varchar(64) default NULL, | ||
10 | PRIMARY KEY (`ID`), | ||
11 | KEY `folder_owner_id` (`Owner`), | ||
12 | KEY `folder_parent_id` (`ParentID`) | ||
13 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
14 | 13 | ||
15 | CREATE TABLE `InventoryItems` ( | 14 | CREATE TABLE InventoryItems ( |
16 | `ID` char(36) NOT NULL, | 15 | ID VARCHAR(36) NOT NULL, |
17 | `InvType` smallint(6) default NULL, | 16 | InvType SMALLINT DEFAULT NULL, |
18 | `AssetType` smallint(6) default NULL, | 17 | AssetType SMALLINT DEFAULT NULL, |
19 | `AssetID` char(36) default NULL, | 18 | AssetID VARCHAR(36) DEFAULT NULL, |
20 | `Folder` char(36) default NULL, | 19 | Folder VARCHAR(36) DEFAULT NULL, |
21 | `Owner` char(36) default NULL, | 20 | Owner VARCHAR(36) DEFAULT NULL, |
22 | `Creator` char(36) default NULL, | 21 | Creator VARCHAR(36) DEFAULT NULL, |
23 | `Name` varchar(64) default NULL, | 22 | Name VARCHAR(64) DEFAULT NULL, |
24 | `Description` varchar(64) default NULL, | 23 | Description VARCHAR(64) DEFAULT NULL, |
25 | `NextPermissions` int(11) default NULL, | 24 | NextPermissions INT DEFAULT NULL, |
26 | `CurrentPermissions` int(11) default NULL, | 25 | CurrentPermissions INT DEFAULT NULL, |
27 | `BasePermissions` int(11) default NULL, | 26 | BasePermissions INT DEFAULT NULL, |
28 | `EveryOnePermissions` int(11) default NULL, | 27 | EveryOnePermissions INT DEFAULT NULL, |
29 | `GroupID` char(36) default NULL, | 28 | GroupID VARCHAR(36) DEFAULT NULL, |
30 | `GroupOwned` tinyint(1) default NULL, | 29 | GroupOwned BIT DEFAULT NULL, |
31 | `SalePrice` int(11) default NULL, | 30 | SalePrice INT DEFAULT NULL, |
32 | `SaleType` smallint(6) default NULL, | 31 | SaleType TINYINT DEFAULT NULL, |
33 | `Flags` int(11) default NULL, | 32 | Flags INT DEFAULT NULL, |
34 | `CreationDate` int(11) default NULL, | 33 | CreationDate INT DEFAULT NULL, |
35 | PRIMARY KEY (`ID`), | 34 | PRIMARY KEY (ID) |
36 | KEY `item_group_id` (`GroupID`), | 35 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1'; |
37 | KEY `item_owner_id` (`Owner`), | ||
38 | KEY `item_folder_id` (`Folder`) | ||
39 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
40 | 36 | ||
41 | COMMIT; \ No newline at end of file | 37 | CREATE INDEX InventoryItemsGroupIdIndex ON InventoryItems (GroupID); |
38 | CREATE INDEX InventoryItemsOwnerIdIndex ON InventoryItems (Owner); | ||
39 | CREATE INDEX InventoryItemsFolderIdIndex ON InventoryItems (Folder); | ||