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_RegionStore.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_RegionStore.sql | 250 |
1 files changed, 166 insertions, 84 deletions
diff --git a/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_RegionStore.sql b/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_RegionStore.sql index 158ebb4..e44f012 100644 --- a/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_RegionStore.sql +++ b/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_RegionStore.sql | |||
@@ -1,87 +1,169 @@ | |||
1 | CREATE TABLE `Prims` ( | 1 | CREATE TABLE Prims ( |
2 | `UUID` char(36) NOT NULL default '', | 2 | UUID VARCHAR(36) NOT NULL, |
3 | `RegionID` char(36) default NULL, | 3 | RegionID VARCHAR(36) DEFAULT NULL, |
4 | `GroupID` char(36) default NULL, | 4 | GroupID VARCHAR(36) DEFAULT NULL, |
5 | `ParentID` int(11) default NULL, | 5 | ParentID INT DEFAULT NULL, |
6 | `ParentUUID` char(36) default NULL, | 6 | ParentUUID VARCHAR(36) DEFAULT NULL, |
7 | `OwnerID` char(36) default NULL, | 7 | OwnerID VARCHAR(36) DEFAULT NULL, |
8 | `LastOwnerID` char(36) default NULL, | 8 | LastOwnerID VARCHAR(36) DEFAULT NULL, |
9 | `CreatorID` char(36) default NULL, | 9 | CreatorID VARCHAR(36) DEFAULT NULL, |
10 | `CreationDate` int(11) default NULL, | 10 | CreationDate INT DEFAULT NULL, |
11 | `LinkNum` int(11) default NULL, | 11 | LinkNum INT DEFAULT NULL, |
12 | `Name` varchar(255) default NULL, | 12 | Name VARCHAR(255) DEFAULT NULL, |
13 | `Text` varchar(255) default NULL, | 13 | Text VARCHAR(255) DEFAULT NULL, |
14 | `Description` varchar(255) default NULL, | 14 | Description VARCHAR(255) DEFAULT NULL, |
15 | `SitName` varchar(255) default NULL, | 15 | SitName VARCHAR(255) DEFAULT NULL, |
16 | `TouchName` varchar(255) default NULL, | 16 | TouchName VARCHAR(255) DEFAULT NULL, |
17 | `ObjectFlags` int(11) default NULL, | 17 | ObjectFlags INT DEFAULT NULL, |
18 | `OwnerMask` int(11) default NULL, | 18 | OwnerMask INT DEFAULT NULL, |
19 | `NextOwnerMask` int(11) default NULL, | 19 | NextOwnerMask INT DEFAULT NULL, |
20 | `GroupMask` int(11) default NULL, | 20 | GroupMask INT DEFAULT NULL, |
21 | `EveryoneMask` int(11) default NULL, | 21 | EveryoneMask INT DEFAULT NULL, |
22 | `BaseMask` int(11) default NULL, | 22 | BaseMask INT DEFAULT NULL, |
23 | `Material` int(1) default NULL, | 23 | Material TINYINT DEFAULT NULL, |
24 | `ScriptAccessPin` int(11) default NULL, | 24 | ScriptAccessPin INT DEFAULT NULL, |
25 | `TextureAnimation` blob, | 25 | TextureAnimation BLOB, |
26 | `ParticleSystem` blob, | 26 | ParticleSystem BLOB, |
27 | `ClickAction` int(1) default NULL, | 27 | ClickAction TINYINT DEFAULT NULL, |
28 | `Color` int(11) default NULL, | 28 | Color INT DEFAULT NULL, |
29 | `PositionX` double default NULL, | 29 | PositionX DOUBLE DEFAULT NULL, |
30 | `PositionY` double default NULL, | 30 | PositionY DOUBLE DEFAULT NULL, |
31 | `PositionZ` double default NULL, | 31 | PositionZ DOUBLE DEFAULT NULL, |
32 | `GroupPositionX` double default NULL, | 32 | GroupPositionX DOUBLE DEFAULT NULL, |
33 | `GroupPositionY` double default NULL, | 33 | GroupPositionY DOUBLE DEFAULT NULL, |
34 | `GroupPositionZ` double default NULL, | 34 | GroupPositionZ DOUBLE DEFAULT NULL, |
35 | `VelocityX` double default NULL, | 35 | VelocityX DOUBLE DEFAULT NULL, |
36 | `VelocityY` double default NULL, | 36 | VelocityY DOUBLE DEFAULT NULL, |
37 | `VelocityZ` double default NULL, | 37 | VelocityZ DOUBLE DEFAULT NULL, |
38 | `AngularVelocityX` double default NULL, | 38 | AngularVelocityX DOUBLE DEFAULT NULL, |
39 | `AngularVelocityY` double default NULL, | 39 | AngularVelocityY DOUBLE DEFAULT NULL, |
40 | `AngularVelocityZ` double default NULL, | 40 | AngularVelocityZ DOUBLE DEFAULT NULL, |
41 | `AccelerationX` double default NULL, | 41 | AccelerationX DOUBLE DEFAULT NULL, |
42 | `AccelerationY` double default NULL, | 42 | AccelerationY DOUBLE DEFAULT NULL, |
43 | `AccelerationZ` double default NULL, | 43 | AccelerationZ DOUBLE DEFAULT NULL, |
44 | `RotationX` double default NULL, | 44 | RotationX DOUBLE DEFAULT NULL, |
45 | `RotationY` double default NULL, | 45 | RotationY DOUBLE DEFAULT NULL, |
46 | `RotationZ` double default NULL, | 46 | RotationZ DOUBLE DEFAULT NULL, |
47 | `RotationW` double default NULL, | 47 | RotationW DOUBLE DEFAULT NULL, |
48 | `SitTargetOffsetX` double default NULL, | 48 | SitTargetOffsetX DOUBLE DEFAULT NULL, |
49 | `SitTargetOffsetY` double default NULL, | 49 | SitTargetOffsetY DOUBLE DEFAULT NULL, |
50 | `SitTargetOffsetZ` double default NULL, | 50 | SitTargetOffsetZ DOUBLE DEFAULT NULL, |
51 | `SitTargetOrientW` double default NULL, | 51 | SitTargetOrientW DOUBLE DEFAULT NULL, |
52 | `SitTargetOrientX` double default NULL, | 52 | SitTargetOrientX DOUBLE DEFAULT NULL, |
53 | `SitTargetOrientY` double default NULL, | 53 | SitTargetOrientY DOUBLE DEFAULT NULL, |
54 | `SitTargetOrientZ` double default NULL, | 54 | SitTargetOrientZ DOUBLE DEFAULT NULL, |
55 | -- this is the shape | 55 | -- this is the shape |
56 | `Shape` int(11) default NULL, | 56 | Shape INT DEFAULT NULL, |
57 | `ScaleX` double default NULL, | 57 | ScaleX DOUBLE DEFAULT NULL, |
58 | `ScaleY` double default NULL, | 58 | ScaleY DOUBLE DEFAULT NULL, |
59 | `ScaleZ` double default NULL, | 59 | ScaleZ DOUBLE DEFAULT NULL, |
60 | `PCode` int(11) default NULL, | 60 | PCode INT DEFAULT NULL, |
61 | `PathBegin` int(11) default NULL, | 61 | PathBegin INT DEFAULT NULL, |
62 | `PathEnd` int(11) default NULL, | 62 | PathEnd INT DEFAULT NULL, |
63 | `PathScaleX` int(11) default NULL, | 63 | PathScaleX INT DEFAULT NULL, |
64 | `PathScaleY` int(11) default NULL, | 64 | PathScaleY INT DEFAULT NULL, |
65 | `PathShearX` int(11) default NULL, | 65 | PathShearX INT DEFAULT NULL, |
66 | `PathShearY` int(11) default NULL, | 66 | PathShearY INT DEFAULT NULL, |
67 | `PathSkew` int(11) default NULL, | 67 | PathSkew INT DEFAULT NULL, |
68 | `PathCurve` int(11) default NULL, | 68 | PathCurve INT DEFAULT NULL, |
69 | `PathRadiusOffset` int(11) default NULL, | 69 | PathRadiusOffset INT DEFAULT NULL, |
70 | `PathRevolutions` int(11) default NULL, | 70 | PathRevolutions INT DEFAULT NULL, |
71 | `PathTaperX` int(11) default NULL, | 71 | PathTaperX INT DEFAULT NULL, |
72 | `PathTaperY` int(11) default NULL, | 72 | PathTaperY INT DEFAULT NULL, |
73 | `PathTwist` int(11) default NULL, | 73 | PathTwist INT DEFAULT NULL, |
74 | `PathTwistBegin` int(11) default NULL, | 74 | PathTwistBegin INT DEFAULT NULL, |
75 | `ProfileBegin` int(11) default NULL, | 75 | ProfileBegin INT DEFAULT NULL, |
76 | `ProfileEnd` int(11) default NULL, | 76 | ProfileEnd INT DEFAULT NULL, |
77 | `ProfileCurve` int(11) default NULL, | 77 | ProfileCurve INT DEFAULT NULL, |
78 | `ProfileHollow` int(11) default NULL, | 78 | ProfileHollow INT DEFAULT NULL, |
79 | `State` int(11) default NULL, | 79 | State INT DEFAULT NULL, |
80 | `Texture` longblob, | 80 | Texture LONGBLOB, |
81 | `ExtraParams` longblob, | 81 | ExtraParams LONGBLOB, |
82 | PRIMARY KEY (`UUID`), | 82 | PRIMARY KEY (UUID) |
83 | KEY `prims_regionuuid` (`RegionID`), | 83 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1'; |
84 | KEY `prims_parentuuid` (`ParentUUID`) | ||
85 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
86 | 84 | ||
85 | CREATE INDEX PrimsRegionIdIndex ON Prims (RegionID); | ||
86 | CREATE INDEX PrimsRegionParentUuidIndex ON Prims (ParentUUID); | ||
87 | |||
88 | CREATE TABLE Terrain ( | ||
89 | RegionID VARCHAR(36) not null, | ||
90 | MapData LONGBLOB, | ||
91 | PRIMARY KEY (RegionID) | ||
92 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1'; | ||
93 | |||
94 | CREATE TABLE PrimItems ( | ||
95 | ItemID VARCHAR(36) NOT NULL, | ||
96 | GroupID VARCHAR(36) DEFAULT NULL, | ||
97 | PrimID VARCHAR(36) DEFAULT NULL, | ||
98 | ParentFolderID VARCHAR(36) DEFAULT NULL, | ||
99 | AssetID VARCHAR(36) DEFAULT NULL, | ||
100 | OwnerID VARCHAR(36) DEFAULT NULL, | ||
101 | LastOwnerID VARCHAR(36) DEFAULT NULL, | ||
102 | CreatorID VARCHAR(36) DEFAULT NULL, | ||
103 | CreationDate BIGINT DEFAULT NULL, | ||
104 | InvType INT DEFAULT NULL, | ||
105 | Name VARCHAR(255) DEFAULT NULL, | ||
106 | Description VARCHAR(255) DEFAULT NULL, | ||
107 | NextPermissions INT DEFAULT NULL, | ||
108 | CurrentPermissions INT DEFAULT NULL, | ||
109 | BasePermissions INT DEFAULT NULL, | ||
110 | EveryonePermissions INT DEFAULT NULL, | ||
111 | GroupPermissions INT DEFAULT NULL, | ||
112 | Flags INT DEFAULT NULL, | ||
113 | PRIMARY KEY (ItemID) | ||
114 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1'; | ||
115 | |||
116 | CREATE INDEX PrimItemsPrimIdIndex ON PrimItems (PrimID); | ||
117 | |||
118 | CREATE TABLE RegionSettings ( | ||
119 | RegionID VARCHAR(36) NOT NULL, | ||
120 | |||
121 | BlockTerraform BIT DEFAULT NULL, | ||
122 | BlockFly BIT DEFAULT NULL, | ||
123 | AllowDamage BIT DEFAULT NULL, | ||
124 | RestrictPushing BIT DEFAULT NULL, | ||
125 | AllowLandResell BIT DEFAULT NULL, | ||
126 | AllowLandJoinDivide BIT DEFAULT NULL, | ||
127 | BlockShowInSearch BIT DEFAULT NULL, | ||
128 | |||
129 | AgentLimit INT DEFAULT NULL, | ||
130 | ObjectBonus DOUBLE DEFAULT NULL, | ||
131 | Maturity INT DEFAULT NULL, | ||
132 | |||
133 | DisableScripts BIT DEFAULT NULL, | ||
134 | DisableCollisions BIT DEFAULT NULL, | ||
135 | DisablePhysics BIT DEFAULT NULL, | ||
136 | |||
137 | TerrainTexture1 VARCHAR(36) DEFAULT NULL, | ||
138 | TerrainTexture2 VARCHAR(36) DEFAULT NULL, | ||
139 | TerrainTexture3 VARCHAR(36) DEFAULT NULL, | ||
140 | TerrainTexture4 VARCHAR(36) DEFAULT NULL, | ||
141 | |||
142 | Elevation1NW DOUBLE DEFAULT NULL, | ||
143 | Elevation2NW DOUBLE DEFAULT NULL, | ||
144 | Elevation1NE DOUBLE DEFAULT NULL, | ||
145 | Elevation2NE DOUBLE DEFAULT NULL, | ||
146 | Elevation1SE DOUBLE DEFAULT NULL, | ||
147 | Elevation2SE DOUBLE DEFAULT NULL, | ||
148 | Elevation1SW DOUBLE DEFAULT NULL, | ||
149 | Elevation2SW DOUBLE DEFAULT NULL, | ||
150 | |||
151 | WaterHeight DOUBLE DEFAULT NULL, | ||
152 | TerrainRaiseLimit DOUBLE DEFAULT NULL, | ||
153 | TerrainLowerLimit DOUBLE DEFAULT NULL, | ||
154 | |||
155 | UseEstateSun BIT DEFAULT NULL, | ||
156 | Sandbox BIT DEFAULT NULL, | ||
157 | |||
158 | SunVectorX DOUBLE DEFAULT NULL, | ||
159 | SunVectorY DOUBLE DEFAULT NULL, | ||
160 | SunVectorZ DOUBLE DEFAULT NULL, | ||
161 | |||
162 | FixedSun BIT DEFAULT NULL, | ||
163 | SunPosition DOUBLE DEFAULT NULL, | ||
164 | |||
165 | Covenant VARCHAR(36) DEFAULT NULL, | ||
166 | |||
167 | PRIMARY KEY (RegionID) | ||
168 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1'; | ||
87 | 169 | ||