aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/NHibernate/Resources
diff options
context:
space:
mode:
authorSean Dague2008-06-18 21:08:16 +0000
committerSean Dague2008-06-18 21:08:16 +0000
commitb58dc7fb3320b8da2771d69921b7b8bb96e32806 (patch)
tree7c4f85e819479ebce8718f5e16cb924109b213a0 /OpenSim/Data/NHibernate/Resources
parentMantis#1567. Thank you kindly, Dmiles for a patch that addresses: (diff)
downloadopensim-SC_OLD-b58dc7fb3320b8da2771d69921b7b8bb96e32806.zip
opensim-SC_OLD-b58dc7fb3320b8da2771d69921b7b8bb96e32806.tar.gz
opensim-SC_OLD-b58dc7fb3320b8da2771d69921b7b8bb96e32806.tar.bz2
opensim-SC_OLD-b58dc7fb3320b8da2771d69921b7b8bb96e32806.tar.xz
add mysql migrations for nhibernate driver
Diffstat (limited to 'OpenSim/Data/NHibernate/Resources')
-rw-r--r--OpenSim/Data/NHibernate/Resources/MySQLDialect/001_AssetStore.sql21
-rw-r--r--OpenSim/Data/NHibernate/Resources/MySQLDialect/001_InventoryStore.sql41
-rw-r--r--OpenSim/Data/NHibernate/Resources/MySQLDialect/001_UserStore.sql84
3 files changed, 136 insertions, 10 deletions
diff --git a/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_AssetStore.sql b/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_AssetStore.sql
index 6e0b61a..3484b64 100644
--- a/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_AssetStore.sql
+++ b/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_AssetStore.sql
@@ -1,14 +1,15 @@
1START TRANSACTION; 1START TRANSACTION;
2 2
3create table Assets( 3CREATE TABLE `Assets` (
4 ID varchar(36) not null primary key, 4 `ID` char(36) NOT NULL,
5 Type int default 0, 5 `Type` smallint(6) default NULL,
6 InvType int default 0, 6 `InvType` smallint(6) default NULL,
7 Name varchar(64), 7 `Name` varchar(64) default NULL,
8 Description varchar(64), 8 `Description` varchar(64) default NULL,
9 Local boolean, 9 `Local` tinyint(1) default NULL,
10 Temporary boolean, 10 `Temporary` tinyint(1) default NULL,
11 Data blob 11 `Data` longblob,
12); 12 PRIMARY KEY (`ID`)
13) ENGINE=InnoDB DEFAULT CHARSET=utf8;
13 14
14COMMIT; \ No newline at end of file 15COMMIT; \ No newline at end of file
diff --git a/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_InventoryStore.sql b/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_InventoryStore.sql
new file mode 100644
index 0000000..80afaa0
--- /dev/null
+++ b/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_InventoryStore.sql
@@ -0,0 +1,41 @@
1START TRANSACTION;
2
3CREATE TABLE `InventoryFolders` (
4 `ID` char(36) NOT NULL,
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
15CREATE TABLE `InventoryItems` (
16 `ID` char(36) NOT NULL,
17 `InvType` smallint(6) default NULL,
18 `AssetType` smallint(6) default NULL,
19 `AssetID` char(36) default NULL,
20 `Folder` char(36) default NULL,
21 `Owner` char(36) default NULL,
22 `Creator` char(36) default NULL,
23 `Name` varchar(64) default NULL,
24 `Description` varchar(64) default NULL,
25 `NextPermissions` int(11) default NULL,
26 `CurrentPermissions` int(11) default NULL,
27 `BasePermissions` int(11) default NULL,
28 `EveryOnePermissions` int(11) default NULL,
29 `GroupID` char(36) default NULL,
30 `GroupOwned` tinyint(1) default NULL,
31 `SalePrice` int(11) default NULL,
32 `SaleType` smallint(6) default NULL,
33 `Flags` int(11) default NULL,
34 `CreationDate` int(11) default NULL,
35 PRIMARY KEY (`ID`),
36 KEY `item_group_id` (`GroupID`),
37 KEY `item_owner_id` (`Owner`),
38 KEY `item_folder_id` (`Folder`)
39) ENGINE=InnoDB DEFAULT CHARSET=utf8;
40
41COMMIT; \ No newline at end of file
diff --git a/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_UserStore.sql b/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_UserStore.sql
new file mode 100644
index 0000000..5db5d29
--- /dev/null
+++ b/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_UserStore.sql
@@ -0,0 +1,84 @@
1START TRANSACTION;
2
3CREATE TABLE `UserAgents` (
4 `ProfileID` varchar(255) NOT NULL,
5 `AgentIP` varchar(24) default NULL,
6 `AgentPort` int(11) default NULL,
7 `AgentOnline` tinyint(1) default NULL,
8 `SessionID` varchar(255) default NULL,
9 `SecureSessionID` varchar(255) default NULL,
10 `InitialRegion` varchar(255) default NULL,
11 `Region` varchar(255) default NULL,
12 `LoginTime` int(11) default NULL,
13 `LogoutTime` int(11) default NULL,
14 `Handle` bigint(20) default NULL,
15 `PositionX` float default NULL,
16 `PositionY` float default NULL,
17 `PositionZ` float default NULL,
18 PRIMARY KEY (`ProfileID`)
19) ENGINE=InnoDB DEFAULT CHARSET=utf8;
20
21CREATE TABLE `UserProfiles` (
22 `ID` varchar(255) NOT NULL,
23 `FirstName` varchar(32) default NULL,
24 `SurName` varchar(32) default NULL,
25 `PasswordHash` varchar(32) default NULL,
26 `PasswordSalt` varchar(32) default NULL,
27 `WebLoginKey` varchar(255) default NULL,
28 `HomeRegionX` int(11) default NULL,
29 `HomeRegionY` int(11) default NULL,
30 `HomeLocationX` float default NULL,
31 `HomeLocationY` float default NULL,
32 `HomeLocationZ` float default NULL,
33 `HomeLookAtX` float default NULL,
34 `HomeLookAtY` float default NULL,
35 `HomeLookAtZ` float default NULL,
36 `Created` int(11) default NULL,
37 `LastLogin` int(11) default NULL,
38 `RootInventoryFolderID` varchar(255) default NULL,
39 `UserInventoryURI` varchar(255) default NULL,
40 `UserAssetURI` varchar(255) default NULL,
41 `Image` varchar(255) default NULL,
42 `FirstLifeImage` varchar(255) default NULL,
43 `AboutText` varchar(255) default NULL,
44 `FirstLifeAboutText` varchar(255) default NULL,
45 PRIMARY KEY (`ID`),
46 KEY `user_surname` (`SurName`),
47 KEY `user_firstname` (`FirstName`)
48) ENGINE=InnoDB DEFAULT CHARSET=utf8;
49
50CREATE TABLE `UserAppearances` (
51 `Owner` varchar(255) NOT NULL,
52 `BodyItem` varchar(255) default NULL,
53 `BodyAsset` varchar(255) default NULL,
54 `SkinItem` varchar(255) default NULL,
55 `SkinAsset` varchar(255) default NULL,
56 `HairItem` varchar(255) default NULL,
57 `HairAsset` varchar(255) default NULL,
58 `EyesItem` varchar(255) default NULL,
59 `EyesAsset` varchar(255) default NULL,
60 `ShirtItem` varchar(255) default NULL,
61 `ShirtAsset` varchar(255) default NULL,
62 `PantsItem` varchar(255) default NULL,
63 `PantsAsset` varchar(255) default NULL,
64 `ShoesItem` varchar(255) default NULL,
65 `ShoesAsset` varchar(255) default NULL,
66 `SocksItem` varchar(255) default NULL,
67 `SocksAsset` varchar(255) default NULL,
68 `JacketItem` varchar(255) default NULL,
69 `JacketAsset` varchar(255) default NULL,
70 `GlovesItem` varchar(255) default NULL,
71 `GlovesAsset` varchar(255) default NULL,
72 `UnderShirtItem` varchar(255) default NULL,
73 `UnderShirtAsset` varchar(255) default NULL,
74 `UnderPantsItem` varchar(255) default NULL,
75 `UnderPantsAsset` varchar(255) default NULL,
76 `SkirtItem` varchar(255) default NULL,
77 `SkirtAsset` varchar(255) default NULL,
78 `Texture` longblob,
79 `VisualParams` longblob,
80 `Serial` int(11) default NULL,
81 PRIMARY KEY (`Owner`)
82) ENGINE=InnoDB DEFAULT CHARSET=utf8;
83
84COMMIT; \ No newline at end of file