aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorAlexRa2010-05-06 22:44:57 +0300
committerAlexRa2010-05-16 17:04:39 +0300
commit1ad12851d076094d6fad3ebe604b4cae378eaef3 (patch)
tree9aa6706c2b890f63f19a5f3c1e05099a2edba000
parentConverted MySQL migration history to the new format (diff)
downloadopensim-SC_OLD-1ad12851d076094d6fad3ebe604b4cae378eaef3.zip
opensim-SC_OLD-1ad12851d076094d6fad3ebe604b4cae378eaef3.tar.gz
opensim-SC_OLD-1ad12851d076094d6fad3ebe604b4cae378eaef3.tar.bz2
opensim-SC_OLD-1ad12851d076094d6fad3ebe604b4cae378eaef3.tar.xz
Migrations for SQLite converted to new format
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/SQLite/Resources/001_AssetStore.sql12
-rw-r--r--OpenSim/Data/SQLite/Resources/001_InventoryStore.sql32
-rw-r--r--OpenSim/Data/SQLite/Resources/001_RegionStore.sql144
-rw-r--r--OpenSim/Data/SQLite/Resources/001_UserStore.sql39
-rw-r--r--OpenSim/Data/SQLite/Resources/002_AssetStore.sql10
-rw-r--r--OpenSim/Data/SQLite/Resources/002_AuthStore.sql5
-rw-r--r--OpenSim/Data/SQLite/Resources/002_FriendsStore.sql5
-rw-r--r--OpenSim/Data/SQLite/Resources/002_InventoryStore.sql8
-rw-r--r--OpenSim/Data/SQLite/Resources/002_RegionStore.sql10
-rw-r--r--OpenSim/Data/SQLite/Resources/002_UserAccount.sql5
-rw-r--r--OpenSim/Data/SQLite/Resources/002_UserStore.sql5
-rw-r--r--OpenSim/Data/SQLite/Resources/003_AssetStore.sql1
-rw-r--r--OpenSim/Data/SQLite/Resources/003_InventoryStore.sql5
-rw-r--r--OpenSim/Data/SQLite/Resources/003_RegionStore.sql5
-rw-r--r--OpenSim/Data/SQLite/Resources/003_UserStore.sql6
-rw-r--r--OpenSim/Data/SQLite/Resources/004_AssetStore.sql7
-rw-r--r--OpenSim/Data/SQLite/Resources/004_RegionStore.sql38
-rw-r--r--OpenSim/Data/SQLite/Resources/004_UserStore.sql6
-rw-r--r--OpenSim/Data/SQLite/Resources/005_RegionStore.sql5
-rw-r--r--OpenSim/Data/SQLite/Resources/005_UserStore.sql5
-rw-r--r--OpenSim/Data/SQLite/Resources/006_RegionStore.sql102
-rw-r--r--OpenSim/Data/SQLite/Resources/006_UserStore.sql20
-rw-r--r--OpenSim/Data/SQLite/Resources/007_RegionStore.sql8
-rw-r--r--OpenSim/Data/SQLite/Resources/007_UserStore.sql7
-rw-r--r--OpenSim/Data/SQLite/Resources/008_RegionStore.sql6
-rw-r--r--OpenSim/Data/SQLite/Resources/008_UserStore.sql5
-rw-r--r--OpenSim/Data/SQLite/Resources/009_RegionStore.sql8
-rw-r--r--OpenSim/Data/SQLite/Resources/009_UserStore.sql11
-rw-r--r--OpenSim/Data/SQLite/Resources/010_RegionStore.sql5
-rw-r--r--OpenSim/Data/SQLite/Resources/010_UserStore.sql37
-rw-r--r--OpenSim/Data/SQLite/Resources/011_RegionStore.sql28
-rw-r--r--OpenSim/Data/SQLite/Resources/012_RegionStore.sql5
-rw-r--r--OpenSim/Data/SQLite/Resources/013_RegionStore.sql6
-rw-r--r--OpenSim/Data/SQLite/Resources/014_RegionStore.sql8
-rw-r--r--OpenSim/Data/SQLite/Resources/015_RegionStore.sql6
-rw-r--r--OpenSim/Data/SQLite/Resources/016_RegionStore.sql5
-rw-r--r--OpenSim/Data/SQLite/Resources/017_RegionStore.sql8
-rw-r--r--OpenSim/Data/SQLite/Resources/018_RegionStore.sql79
-rw-r--r--OpenSim/Data/SQLite/Resources/AssetStore.migrations42
-rw-r--r--OpenSim/Data/SQLite/Resources/AuthStore.migrations (renamed from OpenSim/Data/SQLite/Resources/001_AuthStore.sql)11
-rw-r--r--OpenSim/Data/SQLite/Resources/Avatar.migrations (renamed from OpenSim/Data/SQLite/Resources/001_Avatar.sql)2
-rw-r--r--OpenSim/Data/SQLite/Resources/FriendsStore.migrations (renamed from OpenSim/Data/SQLite/Resources/001_FriendsStore.sql)10
-rw-r--r--OpenSim/Data/SQLite/Resources/InventoryStore.migrations (renamed from OpenSim/Data/SQLite/Resources/004_InventoryStore.sql)56
-rw-r--r--OpenSim/Data/SQLite/Resources/RegionStore.migrations526
-rw-r--r--OpenSim/Data/SQLite/Resources/UserAccount.migrations (renamed from OpenSim/Data/SQLite/Resources/001_UserAccount.sql)14
-rw-r--r--OpenSim/Data/SQLite/Resources/UserStore.migrations169
46 files changed, 828 insertions, 709 deletions
diff --git a/OpenSim/Data/SQLite/Resources/001_AssetStore.sql b/OpenSim/Data/SQLite/Resources/001_AssetStore.sql
deleted file mode 100644
index 2e026ca..0000000
--- a/OpenSim/Data/SQLite/Resources/001_AssetStore.sql
+++ /dev/null
@@ -1,12 +0,0 @@
1BEGIN TRANSACTION;
2CREATE TABLE assets(
3 UUID varchar(255) primary key,
4 Name varchar(255),
5 Description varchar(255),
6 Type integer,
7 InvType integer,
8 Local integer,
9 Temporary integer,
10 Data blob);
11
12COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/001_InventoryStore.sql b/OpenSim/Data/SQLite/Resources/001_InventoryStore.sql
deleted file mode 100644
index 554d5c2..0000000
--- a/OpenSim/Data/SQLite/Resources/001_InventoryStore.sql
+++ /dev/null
@@ -1,32 +0,0 @@
1BEGIN TRANSACTION;
2
3CREATE TABLE inventoryfolders(
4 UUID varchar(255) primary key,
5 name varchar(255),
6 agentID varchar(255),
7 parentID varchar(255),
8 type integer,
9 version integer);
10
11CREATE TABLE inventoryitems(
12 UUID varchar(255) primary key,
13 assetID varchar(255),
14 assetType integer,
15 invType integer,
16 parentFolderID varchar(255),
17 avatarID varchar(255),
18 creatorsID varchar(255),
19 inventoryName varchar(255),
20 inventoryDescription varchar(255),
21 inventoryNextPermissions integer,
22 inventoryCurrentPermissions integer,
23 inventoryBasePermissions integer,
24 inventoryEveryOnePermissions integer,
25 salePrice integer default 99,
26 saleType integer default 0,
27 creationDate integer default 2000,
28 groupID varchar(255) default '00000000-0000-0000-0000-000000000000',
29 groupOwned integer default 0,
30 flags integer default 0);
31
32COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/001_RegionStore.sql b/OpenSim/Data/SQLite/Resources/001_RegionStore.sql
deleted file mode 100644
index 39e8180..0000000
--- a/OpenSim/Data/SQLite/Resources/001_RegionStore.sql
+++ /dev/null
@@ -1,144 +0,0 @@
1BEGIN TRANSACTION;
2
3CREATE TABLE prims(
4 UUID varchar(255) primary key,
5 RegionUUID varchar(255),
6 ParentID integer,
7 CreationDate integer,
8 Name varchar(255),
9 SceneGroupID varchar(255),
10 Text varchar(255),
11 Description varchar(255),
12 SitName varchar(255),
13 TouchName varchar(255),
14 CreatorID varchar(255),
15 OwnerID varchar(255),
16 GroupID varchar(255),
17 LastOwnerID varchar(255),
18 OwnerMask integer,
19 NextOwnerMask integer,
20 GroupMask integer,
21 EveryoneMask integer,
22 BaseMask integer,
23 PositionX float,
24 PositionY float,
25 PositionZ float,
26 GroupPositionX float,
27 GroupPositionY float,
28 GroupPositionZ float,
29 VelocityX float,
30 VelocityY float,
31 VelocityZ float,
32 AngularVelocityX float,
33 AngularVelocityY float,
34 AngularVelocityZ float,
35 AccelerationX float,
36 AccelerationY float,
37 AccelerationZ float,
38 RotationX float,
39 RotationY float,
40 RotationZ float,
41 RotationW float,
42 ObjectFlags integer,
43 SitTargetOffsetX float NOT NULL default 0,
44 SitTargetOffsetY float NOT NULL default 0,
45 SitTargetOffsetZ float NOT NULL default 0,
46 SitTargetOrientW float NOT NULL default 0,
47 SitTargetOrientX float NOT NULL default 0,
48 SitTargetOrientY float NOT NULL default 0,
49 SitTargetOrientZ float NOT NULL default 0);
50
51CREATE TABLE primshapes(
52 UUID varchar(255) primary key,
53 Shape integer,
54 ScaleX float,
55 ScaleY float,
56 ScaleZ float,
57 PCode integer,
58 PathBegin integer,
59 PathEnd integer,
60 PathScaleX integer,
61 PathScaleY integer,
62 PathShearX integer,
63 PathShearY integer,
64 PathSkew integer,
65 PathCurve integer,
66 PathRadiusOffset integer,
67 PathRevolutions integer,
68 PathTaperX integer,
69 PathTaperY integer,
70 PathTwist integer,
71 PathTwistBegin integer,
72 ProfileBegin integer,
73 ProfileEnd integer,
74 ProfileCurve integer,
75 ProfileHollow integer,
76 Texture blob,
77 ExtraParams blob,
78 State Integer NOT NULL default 0);
79
80CREATE TABLE primitems(
81 itemID varchar(255) primary key,
82 primID varchar(255),
83 assetID varchar(255),
84 parentFolderID varchar(255),
85 invType integer,
86 assetType integer,
87 name varchar(255),
88 description varchar(255),
89 creationDate integer,
90 creatorID varchar(255),
91 ownerID varchar(255),
92 lastOwnerID varchar(255),
93 groupID varchar(255),
94 nextPermissions string,
95 currentPermissions string,
96 basePermissions string,
97 everyonePermissions string,
98 groupPermissions string);
99
100CREATE TABLE terrain(
101 RegionUUID varchar(255),
102 Revision integer,
103 Heightfield blob);
104
105CREATE TABLE land(
106 UUID varchar(255) primary key,
107 RegionUUID varchar(255),
108 LocalLandID string,
109 Bitmap blob,
110 Name varchar(255),
111 Desc varchar(255),
112 OwnerUUID varchar(255),
113 IsGroupOwned string,
114 Area integer,
115 AuctionID integer,
116 Category integer,
117 ClaimDate integer,
118 ClaimPrice integer,
119 GroupUUID varchar(255),
120 SalePrice integer,
121 LandStatus integer,
122 LandFlags string,
123 LandingType string,
124 MediaAutoScale string,
125 MediaTextureUUID varchar(255),
126 MediaURL varchar(255),
127 MusicURL varchar(255),
128 PassHours float,
129 PassPrice string,
130 SnapshotUUID varchar(255),
131 UserLocationX float,
132 UserLocationY float,
133 UserLocationZ float,
134 UserLookAtX float,
135 UserLookAtY float,
136 UserLookAtZ float,
137 AuthbuyerID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000');
138
139CREATE TABLE landaccesslist(
140 LandUUID varchar(255),
141 AccessUUID varchar(255),
142 Flags string);
143
144COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/001_UserStore.sql b/OpenSim/Data/SQLite/Resources/001_UserStore.sql
deleted file mode 100644
index b584594..0000000
--- a/OpenSim/Data/SQLite/Resources/001_UserStore.sql
+++ /dev/null
@@ -1,39 +0,0 @@
1BEGIN TRANSACTION;
2
3-- users table
4CREATE TABLE users(
5 UUID varchar(255) primary key,
6 username varchar(255),
7 surname varchar(255),
8 passwordHash varchar(255),
9 passwordSalt varchar(255),
10 homeRegionX integer,
11 homeRegionY integer,
12 homeLocationX float,
13 homeLocationY float,
14 homeLocationZ float,
15 homeLookAtX float,
16 homeLookAtY float,
17 homeLookAtZ float,
18 created integer,
19 lastLogin integer,
20 rootInventoryFolderID varchar(255),
21 userInventoryURI varchar(255),
22 userAssetURI varchar(255),
23 profileCanDoMask integer,
24 profileWantDoMask integer,
25 profileAboutText varchar(255),
26 profileFirstText varchar(255),
27 profileImage varchar(255),
28 profileFirstImage varchar(255),
29 webLoginKey text default '00000000-0000-0000-0000-000000000000');
30-- friends table
31CREATE TABLE userfriends(
32 ownerID varchar(255),
33 friendID varchar(255),
34 friendPerms integer,
35 ownerPerms integer,
36 datetimestamp integer);
37
38COMMIT;
39
diff --git a/OpenSim/Data/SQLite/Resources/002_AssetStore.sql b/OpenSim/Data/SQLite/Resources/002_AssetStore.sql
deleted file mode 100644
index 5339b84..0000000
--- a/OpenSim/Data/SQLite/Resources/002_AssetStore.sql
+++ /dev/null
@@ -1,10 +0,0 @@
1BEGIN TRANSACTION;
2
3CREATE TEMPORARY TABLE assets_backup(UUID,Name,Description,Type,Local,Temporary,Data);
4INSERT INTO assets_backup SELECT UUID,Name,Description,Type,Local,Temporary,Data FROM assets;
5DROP TABLE assets;
6CREATE TABLE assets(UUID,Name,Description,Type,Local,Temporary,Data);
7INSERT INTO assets SELECT UUID,Name,Description,Type,Local,Temporary,Data FROM assets_backup;
8DROP TABLE assets_backup;
9
10COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/002_AuthStore.sql b/OpenSim/Data/SQLite/Resources/002_AuthStore.sql
deleted file mode 100644
index 3237b68..0000000
--- a/OpenSim/Data/SQLite/Resources/002_AuthStore.sql
+++ /dev/null
@@ -1,5 +0,0 @@
1BEGIN TRANSACTION;
2
3INSERT INTO auth (UUID, passwordHash, passwordSalt, webLoginKey) SELECT `UUID` AS UUID, `passwordHash` AS passwordHash, `passwordSalt` AS passwordSalt, `webLoginKey` AS webLoginKey FROM users;
4
5COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/002_FriendsStore.sql b/OpenSim/Data/SQLite/Resources/002_FriendsStore.sql
deleted file mode 100644
index 6733502..0000000
--- a/OpenSim/Data/SQLite/Resources/002_FriendsStore.sql
+++ /dev/null
@@ -1,5 +0,0 @@
1BEGIN TRANSACTION;
2
3INSERT INTO `Friends` SELECT `ownerID`, `friendID`, `friendPerms`, 0 FROM `userfriends`;
4
5COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/002_InventoryStore.sql b/OpenSim/Data/SQLite/Resources/002_InventoryStore.sql
deleted file mode 100644
index 01951d6..0000000
--- a/OpenSim/Data/SQLite/Resources/002_InventoryStore.sql
+++ /dev/null
@@ -1,8 +0,0 @@
1BEGIN TRANSACTION;
2
3create index inventoryfolders_agentid on inventoryfolders(agentid);
4create index inventoryfolders_parentid on inventoryfolders(parentid);
5create index inventoryitems_parentfolderid on inventoryitems(parentfolderid);
6create index inventoryitems_avatarid on inventoryitems(avatarid);
7
8COMMIT; \ No newline at end of file
diff --git a/OpenSim/Data/SQLite/Resources/002_RegionStore.sql b/OpenSim/Data/SQLite/Resources/002_RegionStore.sql
deleted file mode 100644
index c5c7c99..0000000
--- a/OpenSim/Data/SQLite/Resources/002_RegionStore.sql
+++ /dev/null
@@ -1,10 +0,0 @@
1BEGIN TRANSACTION;
2
3CREATE TABLE regionban(
4 regionUUID varchar (255),
5 bannedUUID varchar (255),
6 bannedIp varchar (255),
7 bannedIpHostMask varchar (255)
8 );
9
10COMMIT; \ No newline at end of file
diff --git a/OpenSim/Data/SQLite/Resources/002_UserAccount.sql b/OpenSim/Data/SQLite/Resources/002_UserAccount.sql
deleted file mode 100644
index c7a6293..0000000
--- a/OpenSim/Data/SQLite/Resources/002_UserAccount.sql
+++ /dev/null
@@ -1,5 +0,0 @@
1BEGIN TRANSACTION;
2
3INSERT INTO UserAccounts (PrincipalID, ScopeID, FirstName, LastName, Email, ServiceURLs, Created) SELECT `UUID` AS PrincipalID, '00000000-0000-0000-0000-000000000000' AS ScopeID, username AS FirstName, surname AS LastName, '' as Email, '' AS ServiceURLs, created as Created FROM users;
4
5COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/002_UserStore.sql b/OpenSim/Data/SQLite/Resources/002_UserStore.sql
deleted file mode 100644
index 48fc680..0000000
--- a/OpenSim/Data/SQLite/Resources/002_UserStore.sql
+++ /dev/null
@@ -1,5 +0,0 @@
1BEGIN;
2
3ALTER TABLE users add homeRegionID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000';
4
5COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/003_AssetStore.sql b/OpenSim/Data/SQLite/Resources/003_AssetStore.sql
deleted file mode 100644
index f54f8d9..0000000
--- a/OpenSim/Data/SQLite/Resources/003_AssetStore.sql
+++ /dev/null
@@ -1 +0,0 @@
1DELETE FROM assets WHERE UUID = 'dc4b9f0bd00845c696a401dd947ac621'
diff --git a/OpenSim/Data/SQLite/Resources/003_InventoryStore.sql b/OpenSim/Data/SQLite/Resources/003_InventoryStore.sql
deleted file mode 100644
index 4c6da91..0000000
--- a/OpenSim/Data/SQLite/Resources/003_InventoryStore.sql
+++ /dev/null
@@ -1,5 +0,0 @@
1BEGIN;
2
3alter table inventoryitems add column inventoryGroupPermissions integer unsigned not null default 0;
4
5COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/003_RegionStore.sql b/OpenSim/Data/SQLite/Resources/003_RegionStore.sql
deleted file mode 100644
index 4db2f75..0000000
--- a/OpenSim/Data/SQLite/Resources/003_RegionStore.sql
+++ /dev/null
@@ -1,5 +0,0 @@
1BEGIN;
2
3ALTER TABLE primitems add flags integer not null default 0;
4
5COMMIT; \ No newline at end of file
diff --git a/OpenSim/Data/SQLite/Resources/003_UserStore.sql b/OpenSim/Data/SQLite/Resources/003_UserStore.sql
deleted file mode 100644
index 6f890ee..0000000
--- a/OpenSim/Data/SQLite/Resources/003_UserStore.sql
+++ /dev/null
@@ -1,6 +0,0 @@
1BEGIN;
2
3ALTER TABLE users add userFlags integer NOT NULL default 0;
4ALTER TABLE users add godLevel integer NOT NULL default 0;
5
6COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/004_AssetStore.sql b/OpenSim/Data/SQLite/Resources/004_AssetStore.sql
deleted file mode 100644
index 39421c4..0000000
--- a/OpenSim/Data/SQLite/Resources/004_AssetStore.sql
+++ /dev/null
@@ -1,7 +0,0 @@
1BEGIN;
2
3update assets
4 set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12)
5 where UUID not like '%-%';
6
7COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/004_RegionStore.sql b/OpenSim/Data/SQLite/Resources/004_RegionStore.sql
deleted file mode 100644
index de328cb..0000000
--- a/OpenSim/Data/SQLite/Resources/004_RegionStore.sql
+++ /dev/null
@@ -1,38 +0,0 @@
1BEGIN;
2
3create table regionsettings (
4 regionUUID char(36) not null,
5 block_terraform integer not null,
6 block_fly integer not null,
7 allow_damage integer not null,
8 restrict_pushing integer not null,
9 allow_land_resell integer not null,
10 allow_land_join_divide integer not null,
11 block_show_in_search integer not null,
12 agent_limit integer not null,
13 object_bonus float not null,
14 maturity integer not null,
15 disable_scripts integer not null,
16 disable_collisions integer not null,
17 disable_physics integer not null,
18 terrain_texture_1 char(36) not null,
19 terrain_texture_2 char(36) not null,
20 terrain_texture_3 char(36) not null,
21 terrain_texture_4 char(36) not null,
22 elevation_1_nw float not null,
23 elevation_2_nw float not null,
24 elevation_1_ne float not null,
25 elevation_2_ne float not null,
26 elevation_1_se float not null,
27 elevation_2_se float not null,
28 elevation_1_sw float not null,
29 elevation_2_sw float not null,
30 water_height float not null,
31 terrain_raise_limit float not null,
32 terrain_lower_limit float not null,
33 use_estate_sun integer not null,
34 fixed_sun integer not null,
35 sun_position float not null,
36 covenant char(36));
37
38COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/004_UserStore.sql b/OpenSim/Data/SQLite/Resources/004_UserStore.sql
deleted file mode 100644
index 03142af..0000000
--- a/OpenSim/Data/SQLite/Resources/004_UserStore.sql
+++ /dev/null
@@ -1,6 +0,0 @@
1BEGIN;
2
3ALTER TABLE users add customType varchar(32) not null default '';
4ALTER TABLE users add partner char(36) not null default '00000000-0000-0000-0000-000000000000';
5
6COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/005_RegionStore.sql b/OpenSim/Data/SQLite/Resources/005_RegionStore.sql
deleted file mode 100644
index 1f6d1bd..0000000
--- a/OpenSim/Data/SQLite/Resources/005_RegionStore.sql
+++ /dev/null
@@ -1,5 +0,0 @@
1BEGIN;
2
3delete from regionsettings;
4
5COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/005_UserStore.sql b/OpenSim/Data/SQLite/Resources/005_UserStore.sql
deleted file mode 100644
index e45c09a..0000000
--- a/OpenSim/Data/SQLite/Resources/005_UserStore.sql
+++ /dev/null
@@ -1,5 +0,0 @@
1BEGIN;
2
3CREATE TABLE `avatarattachments` (`UUID` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', `attachpoint` int(11) NOT NULL DEFAULT 0, `item` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', `asset` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000');
4
5COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/006_RegionStore.sql b/OpenSim/Data/SQLite/Resources/006_RegionStore.sql
deleted file mode 100644
index 94ed818..0000000
--- a/OpenSim/Data/SQLite/Resources/006_RegionStore.sql
+++ /dev/null
@@ -1,102 +0,0 @@
1BEGIN TRANSACTION;
2
3CREATE TABLE estate_groups (
4 EstateID int(10) NOT NULL,
5 uuid char(36) NOT NULL
6);
7
8CREATE TABLE estate_managers (
9 EstateID int(10) NOT NULL,
10 uuid char(36) NOT NULL
11);
12
13CREATE TABLE estate_map (
14 RegionID char(36) NOT NULL default '00000000-0000-0000-0000-000000000000',
15 EstateID int(11) NOT NULL
16);
17
18CREATE TABLE estate_settings (
19 EstateID INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
20 EstateName varchar(64) default NULL,
21 AbuseEmailToEstateOwner tinyint(4) NOT NULL,
22 DenyAnonymous tinyint(4) NOT NULL,
23 ResetHomeOnTeleport tinyint(4) NOT NULL,
24 FixedSun tinyint(4) NOT NULL,
25 DenyTransacted tinyint(4) NOT NULL,
26 BlockDwell tinyint(4) NOT NULL,
27 DenyIdentified tinyint(4) NOT NULL,
28 AllowVoice tinyint(4) NOT NULL,
29 UseGlobalTime tinyint(4) NOT NULL,
30 PricePerMeter int(11) NOT NULL,
31 TaxFree tinyint(4) NOT NULL,
32 AllowDirectTeleport tinyint(4) NOT NULL,
33 RedirectGridX int(11) NOT NULL,
34 RedirectGridY int(11) NOT NULL,
35 ParentEstateID int(10) NOT NULL,
36 SunPosition double NOT NULL,
37 EstateSkipScripts tinyint(4) NOT NULL,
38 BillableFactor float NOT NULL,
39 PublicAccess tinyint(4) NOT NULL
40);
41insert into estate_settings (EstateID,EstateName,AbuseEmailToEstateOwner,DenyAnonymous,ResetHomeOnTeleport,FixedSun,DenyTransacted,BlockDwell,DenyIdentified,AllowVoice,UseGlobalTime,PricePerMeter,TaxFree,AllowDirectTeleport,RedirectGridX,RedirectGridY,ParentEstateID,SunPosition,PublicAccess,EstateSkipScripts,BillableFactor) values ( 99, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '');
42delete from estate_settings;
43CREATE TABLE estate_users (
44 EstateID int(10) NOT NULL,
45 uuid char(36) NOT NULL
46);
47
48CREATE TABLE estateban (
49 EstateID int(10) NOT NULL,
50 bannedUUID varchar(36) NOT NULL,
51 bannedIp varchar(16) NOT NULL,
52 bannedIpHostMask varchar(16) NOT NULL,
53 bannedNameMask varchar(64) default NULL
54);
55
56drop table regionsettings;
57CREATE TABLE regionsettings (
58 regionUUID char(36) NOT NULL,
59 block_terraform int(11) NOT NULL,
60 block_fly int(11) NOT NULL,
61 allow_damage int(11) NOT NULL,
62 restrict_pushing int(11) NOT NULL,
63 allow_land_resell int(11) NOT NULL,
64 allow_land_join_divide int(11) NOT NULL,
65 block_show_in_search int(11) NOT NULL,
66 agent_limit int(11) NOT NULL,
67 object_bonus float NOT NULL,
68 maturity int(11) NOT NULL,
69 disable_scripts int(11) NOT NULL,
70 disable_collisions int(11) NOT NULL,
71 disable_physics int(11) NOT NULL,
72 terrain_texture_1 char(36) NOT NULL,
73 terrain_texture_2 char(36) NOT NULL,
74 terrain_texture_3 char(36) NOT NULL,
75 terrain_texture_4 char(36) NOT NULL,
76 elevation_1_nw float NOT NULL,
77 elevation_2_nw float NOT NULL,
78 elevation_1_ne float NOT NULL,
79 elevation_2_ne float NOT NULL,
80 elevation_1_se float NOT NULL,
81 elevation_2_se float NOT NULL,
82 elevation_1_sw float NOT NULL,
83 elevation_2_sw float NOT NULL,
84 water_height float NOT NULL,
85 terrain_raise_limit float NOT NULL,
86 terrain_lower_limit float NOT NULL,
87 use_estate_sun int(11) NOT NULL,
88 fixed_sun int(11) NOT NULL,
89 sun_position float NOT NULL,
90 covenant char(36) default NULL,
91 Sandbox tinyint(4) NOT NULL,
92 PRIMARY KEY (regionUUID)
93);
94
95CREATE INDEX estate_ban_estate_id on estateban(EstateID);
96CREATE INDEX estate_groups_estate_id on estate_groups(EstateID);
97CREATE INDEX estate_managers_estate_id on estate_managers(EstateID);
98CREATE INDEX estate_map_estate_id on estate_map(EstateID);
99CREATE UNIQUE INDEX estate_map_region_id on estate_map(RegionID);
100CREATE INDEX estate_users_estate_id on estate_users(EstateID);
101
102COMMIT; \ No newline at end of file
diff --git a/OpenSim/Data/SQLite/Resources/006_UserStore.sql b/OpenSim/Data/SQLite/Resources/006_UserStore.sql
deleted file mode 100644
index f9454c5..0000000
--- a/OpenSim/Data/SQLite/Resources/006_UserStore.sql
+++ /dev/null
@@ -1,20 +0,0 @@
1BEGIN TRANSACTION;
2
3-- usersagents table
4CREATE TABLE IF NOT EXISTS useragents(
5 UUID varchar(255) primary key,
6 agentIP varchar(255),
7 agentPort integer,
8 agentOnline boolean,
9 sessionID varchar(255),
10 secureSessionID varchar(255),
11 regionID varchar(255),
12 loginTime integer,
13 logoutTime integer,
14 currentRegion varchar(255),
15 currentHandle varchar(255),
16 currentPosX float,
17 currentPosY float,
18 currentPosZ float);
19
20COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/007_RegionStore.sql b/OpenSim/Data/SQLite/Resources/007_RegionStore.sql
deleted file mode 100644
index 1c813a0..0000000
--- a/OpenSim/Data/SQLite/Resources/007_RegionStore.sql
+++ /dev/null
@@ -1,8 +0,0 @@
1begin;
2
3alter table estate_settings add column AbuseEmail varchar(255) not null default '';
4
5alter table estate_settings add column EstateOwner varchar(36) not null default '';
6
7commit;
8
diff --git a/OpenSim/Data/SQLite/Resources/007_UserStore.sql b/OpenSim/Data/SQLite/Resources/007_UserStore.sql
deleted file mode 100644
index 8b0cd28..0000000
--- a/OpenSim/Data/SQLite/Resources/007_UserStore.sql
+++ /dev/null
@@ -1,7 +0,0 @@
1BEGIN TRANSACTION;
2
3ALTER TABLE useragents add currentLookAtX float not null default 128;
4ALTER TABLE useragents add currentLookAtY float not null default 128;
5ALTER TABLE useragents add currentLookAtZ float not null default 70;
6
7COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/008_RegionStore.sql b/OpenSim/Data/SQLite/Resources/008_RegionStore.sql
deleted file mode 100644
index 28bfbf5..0000000
--- a/OpenSim/Data/SQLite/Resources/008_RegionStore.sql
+++ /dev/null
@@ -1,6 +0,0 @@
1begin;
2
3alter table estate_settings add column DenyMinors tinyint not null default 0;
4
5commit;
6
diff --git a/OpenSim/Data/SQLite/Resources/008_UserStore.sql b/OpenSim/Data/SQLite/Resources/008_UserStore.sql
deleted file mode 100644
index 97da818..0000000
--- a/OpenSim/Data/SQLite/Resources/008_UserStore.sql
+++ /dev/null
@@ -1,5 +0,0 @@
1BEGIN TRANSACTION;
2
3ALTER TABLE users add email varchar(250);
4
5COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/009_RegionStore.sql b/OpenSim/Data/SQLite/Resources/009_RegionStore.sql
deleted file mode 100644
index 1f40548..0000000
--- a/OpenSim/Data/SQLite/Resources/009_RegionStore.sql
+++ /dev/null
@@ -1,8 +0,0 @@
1BEGIN;
2
3ALTER TABLE prims ADD COLUMN ColorR integer not null default 0;
4ALTER TABLE prims ADD COLUMN ColorG integer not null default 0;
5ALTER TABLE prims ADD COLUMN ColorB integer not null default 0;
6ALTER TABLE prims ADD COLUMN ColorA integer not null default 0;
7
8COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/009_UserStore.sql b/OpenSim/Data/SQLite/Resources/009_UserStore.sql
deleted file mode 100644
index 8ab03ef..0000000
--- a/OpenSim/Data/SQLite/Resources/009_UserStore.sql
+++ /dev/null
@@ -1,11 +0,0 @@
1BEGIN;
2
3update users
4 set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12)
5 where UUID not like '%-%';
6
7update useragents
8 set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12)
9 where UUID not like '%-%';
10
11COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/010_RegionStore.sql b/OpenSim/Data/SQLite/Resources/010_RegionStore.sql
deleted file mode 100644
index b91ccf0..0000000
--- a/OpenSim/Data/SQLite/Resources/010_RegionStore.sql
+++ /dev/null
@@ -1,5 +0,0 @@
1BEGIN;
2
3ALTER TABLE prims ADD COLUMN ClickAction INTEGER NOT NULL default 0;
4
5COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/010_UserStore.sql b/OpenSim/Data/SQLite/Resources/010_UserStore.sql
deleted file mode 100644
index 5f956da..0000000
--- a/OpenSim/Data/SQLite/Resources/010_UserStore.sql
+++ /dev/null
@@ -1,37 +0,0 @@
1BEGIN TRANSACTION;
2
3CREATE TABLE IF NOT EXISTS avatarappearance(
4 Owner varchar(36) NOT NULL primary key,
5 BodyItem varchar(36) DEFAULT NULL,
6 BodyAsset varchar(36) DEFAULT NULL,
7 SkinItem varchar(36) DEFAULT NULL,
8 SkinAsset varchar(36) DEFAULT NULL,
9 HairItem varchar(36) DEFAULT NULL,
10 HairAsset varchar(36) DEFAULT NULL,
11 EyesItem varchar(36) DEFAULT NULL,
12 EyesAsset varchar(36) DEFAULT NULL,
13 ShirtItem varchar(36) DEFAULT NULL,
14 ShirtAsset varchar(36) DEFAULT NULL,
15 PantsItem varchar(36) DEFAULT NULL,
16 PantsAsset varchar(36) DEFAULT NULL,
17 ShoesItem varchar(36) DEFAULT NULL,
18 ShoesAsset varchar(36) DEFAULT NULL,
19 SocksItem varchar(36) DEFAULT NULL,
20 SocksAsset varchar(36) DEFAULT NULL,
21 JacketItem varchar(36) DEFAULT NULL,
22 JacketAsset varchar(36) DEFAULT NULL,
23 GlovesItem varchar(36) DEFAULT NULL,
24 GlovesAsset varchar(36) DEFAULT NULL,
25 UnderShirtItem varchar(36) DEFAULT NULL,
26 UnderShirtAsset varchar(36) DEFAULT NULL,
27 UnderPantsItem varchar(36) DEFAULT NULL,
28 UnderPantsAsset varchar(36) DEFAULT NULL,
29 SkirtItem varchar(36) DEFAULT NULL,
30 SkirtAsset varchar(36) DEFAULT NULL,
31 Texture blob,
32 VisualParams blob,
33 Serial int DEFAULT NULL,
34 AvatarHeight float DEFAULT NULL
35);
36
37COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/011_RegionStore.sql b/OpenSim/Data/SQLite/Resources/011_RegionStore.sql
deleted file mode 100644
index 42bef89..0000000
--- a/OpenSim/Data/SQLite/Resources/011_RegionStore.sql
+++ /dev/null
@@ -1,28 +0,0 @@
1BEGIN;
2
3ALTER TABLE prims ADD COLUMN PayPrice INTEGER NOT NULL default 0;
4ALTER TABLE prims ADD COLUMN PayButton1 INTEGER NOT NULL default 0;
5ALTER TABLE prims ADD COLUMN PayButton2 INTEGER NOT NULL default 0;
6ALTER TABLE prims ADD COLUMN PayButton3 INTEGER NOT NULL default 0;
7ALTER TABLE prims ADD COLUMN PayButton4 INTEGER NOT NULL default 0;
8ALTER TABLE prims ADD COLUMN LoopedSound varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000';
9ALTER TABLE prims ADD COLUMN LoopedSoundGain float NOT NULL default 0;
10ALTER TABLE prims ADD COLUMN TextureAnimation string;
11ALTER TABLE prims ADD COLUMN ParticleSystem string;
12ALTER TABLE prims ADD COLUMN OmegaX float NOT NULL default 0;
13ALTER TABLE prims ADD COLUMN OmegaY float NOT NULL default 0;
14ALTER TABLE prims ADD COLUMN OmegaZ float NOT NULL default 0;
15ALTER TABLE prims ADD COLUMN CameraEyeOffsetX float NOT NULL default 0;
16ALTER TABLE prims ADD COLUMN CameraEyeOffsetY float NOT NULL default 0;
17ALTER TABLE prims ADD COLUMN CameraEyeOffsetZ float NOT NULL default 0;
18ALTER TABLE prims ADD COLUMN CameraAtOffsetX float NOT NULL default 0;
19ALTER TABLE prims ADD COLUMN CameraAtOffsetY float NOT NULL default 0;
20ALTER TABLE prims ADD COLUMN CameraAtOffsetZ float NOT NULL default 0;
21ALTER TABLE prims ADD COLUMN ForceMouselook string NOT NULL default 0;
22ALTER TABLE prims ADD COLUMN ScriptAccessPin INTEGER NOT NULL default 0;
23ALTER TABLE prims ADD COLUMN AllowedDrop INTEGER NOT NULL default 0;
24ALTER TABLE prims ADD COLUMN DieAtEdge string NOT NULL default 0;
25ALTER TABLE prims ADD COLUMN SalePrice INTEGER NOT NULL default 0;
26ALTER TABLE prims ADD COLUMN SaleType string NOT NULL default 0;
27
28COMMIT; \ No newline at end of file
diff --git a/OpenSim/Data/SQLite/Resources/012_RegionStore.sql b/OpenSim/Data/SQLite/Resources/012_RegionStore.sql
deleted file mode 100644
index d952b78..0000000
--- a/OpenSim/Data/SQLite/Resources/012_RegionStore.sql
+++ /dev/null
@@ -1,5 +0,0 @@
1BEGIN;
2
3ALTER TABLE prims ADD COLUMN Material INTEGER NOT NULL default 3;
4
5COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/013_RegionStore.sql b/OpenSim/Data/SQLite/Resources/013_RegionStore.sql
deleted file mode 100644
index 11529cd..0000000
--- a/OpenSim/Data/SQLite/Resources/013_RegionStore.sql
+++ /dev/null
@@ -1,6 +0,0 @@
1BEGIN;
2
3ALTER TABLE land ADD COLUMN OtherCleanTime INTEGER NOT NULL default 0;
4ALTER TABLE land ADD COLUMN Dwell INTEGER NOT NULL default 0;
5
6COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/014_RegionStore.sql b/OpenSim/Data/SQLite/Resources/014_RegionStore.sql
deleted file mode 100644
index c59b27e..0000000
--- a/OpenSim/Data/SQLite/Resources/014_RegionStore.sql
+++ /dev/null
@@ -1,8 +0,0 @@
1begin;
2
3ALTER TABLE regionsettings ADD COLUMN sunvectorx double NOT NULL default 0;
4ALTER TABLE regionsettings ADD COLUMN sunvectory double NOT NULL default 0;
5ALTER TABLE regionsettings ADD COLUMN sunvectorz double NOT NULL default 0;
6
7commit;
8
diff --git a/OpenSim/Data/SQLite/Resources/015_RegionStore.sql b/OpenSim/Data/SQLite/Resources/015_RegionStore.sql
deleted file mode 100644
index c43f356..0000000
--- a/OpenSim/Data/SQLite/Resources/015_RegionStore.sql
+++ /dev/null
@@ -1,6 +0,0 @@
1BEGIN;
2
3ALTER TABLE prims ADD COLUMN CollisionSound varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000';
4ALTER TABLE prims ADD COLUMN CollisionSoundVolume float NOT NULL default 0;
5
6COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/016_RegionStore.sql b/OpenSim/Data/SQLite/Resources/016_RegionStore.sql
deleted file mode 100644
index 52f160c..0000000
--- a/OpenSim/Data/SQLite/Resources/016_RegionStore.sql
+++ /dev/null
@@ -1,5 +0,0 @@
1BEGIN;
2
3ALTER TABLE prims ADD COLUMN VolumeDetect INTEGER NOT NULL DEFAULT 0;
4
5COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/017_RegionStore.sql b/OpenSim/Data/SQLite/Resources/017_RegionStore.sql
deleted file mode 100644
index 6c6b7b5..0000000
--- a/OpenSim/Data/SQLite/Resources/017_RegionStore.sql
+++ /dev/null
@@ -1,8 +0,0 @@
1BEGIN;
2CREATE TEMPORARY TABLE prims_backup(UUID,RegionUUID,CreationDate,Name,SceneGroupID,Text,Description,SitName,TouchName,CreatorID,OwnerID,GroupID,LastOwnerID,OwnerMask,NextOwnerMask,GroupMask,EveryoneMask,BaseMask,PositionX,PositionY,PositionZ,GroupPositionX,GroupPositionY,GroupPositionZ,VelocityX,VelocityY,VelocityZ,AngularVelocityX,AngularVelocityY,AngularVelocityZ,AccelerationX,AccelerationY,AccelerationZ,RotationX,RotationY,RotationZ,RotationW,ObjectFlags,SitTargetOffsetX,SitTargetOffsetY,SitTargetOffsetZ,SitTargetOrientW,SitTargetOrientX,SitTargetOrientY,SitTargetOrientZ,ColorR,ColorG,ColorB,ColorA,ClickAction,PayPrice,PayButton1,PayButton2,PayButton3,PayButton4,LoopedSound,LoopedSoundGain,TextureAnimation,ParticleSystem,OmegaX,OmegaY,OmegaZ,CameraEyeOffsetX,CameraEyeOffsetY,CameraEyeOffsetZ,CameraAtOffsetX,CameraAtOffsetY,CameraAtOffsetZ,ForceMouselook,ScriptAccessPin,AllowedDrop,DieAtEdge,SalePrice,SaleType,Material,CollisionSound,CollisionSoundVolume,VolumeDetect);
3INSERT INTO prims_backup SELECT UUID,RegionUUID,CreationDate,Name,SceneGroupID,Text,Description,SitName,TouchName,CreatorID,OwnerID,GroupID,LastOwnerID,OwnerMask,NextOwnerMask,GroupMask,EveryoneMask,BaseMask,PositionX,PositionY,PositionZ,GroupPositionX,GroupPositionY,GroupPositionZ,VelocityX,VelocityY,VelocityZ,AngularVelocityX,AngularVelocityY,AngularVelocityZ,AccelerationX,AccelerationY,AccelerationZ,RotationX,RotationY,RotationZ,RotationW,ObjectFlags,SitTargetOffsetX,SitTargetOffsetY,SitTargetOffsetZ,SitTargetOrientW,SitTargetOrientX,SitTargetOrientY,SitTargetOrientZ,ColorR,ColorG,ColorB,ColorA,ClickAction,PayPrice,PayButton1,PayButton2,PayButton3,PayButton4,LoopedSound,LoopedSoundGain,TextureAnimation,ParticleSystem,OmegaX,OmegaY,OmegaZ,CameraEyeOffsetX,CameraEyeOffsetY,CameraEyeOffsetZ,CameraAtOffsetX,CameraAtOffsetY,CameraAtOffsetZ,ForceMouselook,ScriptAccessPin,AllowedDrop,DieAtEdge,SalePrice,SaleType,Material,CollisionSound,CollisionSoundVolume,VolumeDetect FROM prims;
4DROP TABLE prims;
5CREATE TABLE prims(UUID,RegionUUID,CreationDate,Name,SceneGroupID,Text,Description,SitName,TouchName,CreatorID,OwnerID,GroupID,LastOwnerID,OwnerMask,NextOwnerMask,GroupMask,EveryoneMask,BaseMask,PositionX,PositionY,PositionZ,GroupPositionX,GroupPositionY,GroupPositionZ,VelocityX,VelocityY,VelocityZ,AngularVelocityX,AngularVelocityY,AngularVelocityZ,AccelerationX,AccelerationY,AccelerationZ,RotationX,RotationY,RotationZ,RotationW,ObjectFlags,SitTargetOffsetX,SitTargetOffsetY,SitTargetOffsetZ,SitTargetOrientW,SitTargetOrientX,SitTargetOrientY,SitTargetOrientZ,ColorR,ColorG,ColorB,ColorA,ClickAction,PayPrice,PayButton1,PayButton2,PayButton3,PayButton4,LoopedSound,LoopedSoundGain,TextureAnimation,ParticleSystem,OmegaX,OmegaY,OmegaZ,CameraEyeOffsetX,CameraEyeOffsetY,CameraEyeOffsetZ,CameraAtOffsetX,CameraAtOffsetY,CameraAtOffsetZ,ForceMouselook,ScriptAccessPin,AllowedDrop,DieAtEdge,SalePrice,SaleType,Material,CollisionSound,CollisionSoundVolume,VolumeDetect);
6INSERT INTO prims SELECT UUID,RegionUUID,CreationDate,Name,SceneGroupID,Text,Description,SitName,TouchName,CreatorID,OwnerID,GroupID,LastOwnerID,OwnerMask,NextOwnerMask,GroupMask,EveryoneMask,BaseMask,PositionX,PositionY,PositionZ,GroupPositionX,GroupPositionY,GroupPositionZ,VelocityX,VelocityY,VelocityZ,AngularVelocityX,AngularVelocityY,AngularVelocityZ,AccelerationX,AccelerationY,AccelerationZ,RotationX,RotationY,RotationZ,RotationW,ObjectFlags,SitTargetOffsetX,SitTargetOffsetY,SitTargetOffsetZ,SitTargetOrientW,SitTargetOrientX,SitTargetOrientY,SitTargetOrientZ,ColorR,ColorG,ColorB,ColorA,ClickAction,PayPrice,PayButton1,PayButton2,PayButton3,PayButton4,LoopedSound,LoopedSoundGain,TextureAnimation,ParticleSystem,OmegaX,OmegaY,OmegaZ,CameraEyeOffsetX,CameraEyeOffsetY,CameraEyeOffsetZ,CameraAtOffsetX,CameraAtOffsetY,CameraAtOffsetZ,ForceMouselook,ScriptAccessPin,AllowedDrop,DieAtEdge,SalePrice,SaleType,Material,CollisionSound,CollisionSoundVolume,VolumeDetect FROM prims_backup;
7DROP TABLE prims_backup;
8COMMIT; \ No newline at end of file
diff --git a/OpenSim/Data/SQLite/Resources/018_RegionStore.sql b/OpenSim/Data/SQLite/Resources/018_RegionStore.sql
deleted file mode 100644
index 6a390c2..0000000
--- a/OpenSim/Data/SQLite/Resources/018_RegionStore.sql
+++ /dev/null
@@ -1,79 +0,0 @@
1BEGIN;
2
3update terrain
4 set RegionUUID = substr(RegionUUID, 1, 8) || "-" || substr(RegionUUID, 9, 4) || "-" || substr(RegionUUID, 13, 4) || "-" || substr(RegionUUID, 17, 4) || "-" || substr(RegionUUID, 21, 12)
5 where RegionUUID not like '%-%';
6
7
8update landaccesslist
9 set LandUUID = substr(LandUUID, 1, 8) || "-" || substr(LandUUID, 9, 4) || "-" || substr(LandUUID, 13, 4) || "-" || substr(LandUUID, 17, 4) || "-" || substr(LandUUID, 21, 12)
10 where LandUUID not like '%-%';
11
12update landaccesslist
13 set AccessUUID = substr(AccessUUID, 1, 8) || "-" || substr(AccessUUID, 9, 4) || "-" || substr(AccessUUID, 13, 4) || "-" || substr(AccessUUID, 17, 4) || "-" || substr(AccessUUID, 21, 12)
14 where AccessUUID not like '%-%';
15
16
17update prims
18 set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12)
19 where UUID not like '%-%';
20
21update prims
22 set RegionUUID = substr(RegionUUID, 1, 8) || "-" || substr(RegionUUID, 9, 4) || "-" || substr(RegionUUID, 13, 4) || "-" || substr(RegionUUID, 17, 4) || "-" || substr(RegionUUID, 21, 12)
23 where RegionUUID not like '%-%';
24
25update prims
26 set SceneGroupID = substr(SceneGroupID, 1, 8) || "-" || substr(SceneGroupID, 9, 4) || "-" || substr(SceneGroupID, 13, 4) || "-" || substr(SceneGroupID, 17, 4) || "-" || substr(SceneGroupID, 21, 12)
27 where SceneGroupID not like '%-%';
28
29update prims
30 set CreatorID = substr(CreatorID, 1, 8) || "-" || substr(CreatorID, 9, 4) || "-" || substr(CreatorID, 13, 4) || "-" || substr(CreatorID, 17, 4) || "-" || substr(CreatorID, 21, 12)
31 where CreatorID not like '%-%';
32
33update prims
34 set OwnerID = substr(OwnerID, 1, 8) || "-" || substr(OwnerID, 9, 4) || "-" || substr(OwnerID, 13, 4) || "-" || substr(OwnerID, 17, 4) || "-" || substr(OwnerID, 21, 12)
35 where OwnerID not like '%-%';
36
37update prims
38 set GroupID = substr(GroupID, 1, 8) || "-" || substr(GroupID, 9, 4) || "-" || substr(GroupID, 13, 4) || "-" || substr(GroupID, 17, 4) || "-" || substr(GroupID, 21, 12)
39 where GroupID not like '%-%';
40
41update prims
42 set LastOwnerID = substr(LastOwnerID, 1, 8) || "-" || substr(LastOwnerID, 9, 4) || "-" || substr(LastOwnerID, 13, 4) || "-" || substr(LastOwnerID, 17, 4) || "-" || substr(LastOwnerID, 21, 12)
43 where LastOwnerID not like '%-%';
44
45
46update primshapes
47 set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12)
48 where UUID not like '%-%';
49
50
51update land
52 set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12)
53 where UUID not like '%-%';
54
55update land
56 set RegionUUID = substr(RegionUUID, 1, 8) || "-" || substr(RegionUUID, 9, 4) || "-" || substr(RegionUUID, 13, 4) || "-" || substr(RegionUUID, 17, 4) || "-" || substr(RegionUUID, 21, 12)
57 where RegionUUID not like '%-%';
58
59update land
60 set OwnerUUID = substr(OwnerUUID, 1, 8) || "-" || substr(OwnerUUID, 9, 4) || "-" || substr(OwnerUUID, 13, 4) || "-" || substr(OwnerUUID, 17, 4) || "-" || substr(OwnerUUID, 21, 12)
61 where OwnerUUID not like '%-%';
62
63update land
64 set GroupUUID = substr(GroupUUID, 1, 8) || "-" || substr(GroupUUID, 9, 4) || "-" || substr(GroupUUID, 13, 4) || "-" || substr(GroupUUID, 17, 4) || "-" || substr(GroupUUID, 21, 12)
65 where GroupUUID not like '%-%';
66
67update land
68 set MediaTextureUUID = substr(MediaTextureUUID, 1, 8) || "-" || substr(MediaTextureUUID, 9, 4) || "-" || substr(MediaTextureUUID, 13, 4) || "-" || substr(MediaTextureUUID, 17, 4) || "-" || substr(MediaTextureUUID, 21, 12)
69 where MediaTextureUUID not like '%-%';
70
71update land
72 set SnapshotUUID = substr(SnapshotUUID, 1, 8) || "-" || substr(SnapshotUUID, 9, 4) || "-" || substr(SnapshotUUID, 13, 4) || "-" || substr(SnapshotUUID, 17, 4) || "-" || substr(SnapshotUUID, 21, 12)
73 where SnapshotUUID not like '%-%';
74
75update land
76 set AuthbuyerID = substr(AuthbuyerID, 1, 8) || "-" || substr(AuthbuyerID, 9, 4) || "-" || substr(AuthbuyerID, 13, 4) || "-" || substr(AuthbuyerID, 17, 4) || "-" || substr(AuthbuyerID, 21, 12)
77 where AuthbuyerID not like '%-%';
78
79COMMIT; \ No newline at end of file
diff --git a/OpenSim/Data/SQLite/Resources/AssetStore.migrations b/OpenSim/Data/SQLite/Resources/AssetStore.migrations
new file mode 100644
index 0000000..fb72b91
--- /dev/null
+++ b/OpenSim/Data/SQLite/Resources/AssetStore.migrations
@@ -0,0 +1,42 @@
1:VERSION 1
2
3BEGIN TRANSACTION;
4CREATE TABLE assets(
5 UUID varchar(255) primary key,
6 Name varchar(255),
7 Description varchar(255),
8 Type integer,
9 InvType integer,
10 Local integer,
11 Temporary integer,
12 Data blob);
13
14COMMIT;
15
16:VERSION 2
17
18BEGIN TRANSACTION;
19
20CREATE TEMPORARY TABLE assets_backup(UUID,Name,Description,Type,Local,Temporary,Data);
21INSERT INTO assets_backup SELECT UUID,Name,Description,Type,Local,Temporary,Data FROM assets;
22DROP TABLE assets;
23CREATE TABLE assets(UUID,Name,Description,Type,Local,Temporary,Data);
24INSERT INTO assets SELECT UUID,Name,Description,Type,Local,Temporary,Data FROM assets_backup;
25DROP TABLE assets_backup;
26
27COMMIT;
28
29:VERSION 3
30
31DELETE FROM assets WHERE UUID = 'dc4b9f0bd00845c696a401dd947ac621'
32
33:VERSION 4
34
35BEGIN;
36
37update assets
38 set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12)
39 where UUID not like '%-%';
40
41COMMIT;
42
diff --git a/OpenSim/Data/SQLite/Resources/001_AuthStore.sql b/OpenSim/Data/SQLite/Resources/AuthStore.migrations
index 468567d..ca6bdf5 100644
--- a/OpenSim/Data/SQLite/Resources/001_AuthStore.sql
+++ b/OpenSim/Data/SQLite/Resources/AuthStore.migrations
@@ -1,3 +1,5 @@
1:VERSION 1
2
1BEGIN TRANSACTION; 3BEGIN TRANSACTION;
2 4
3CREATE TABLE auth ( 5CREATE TABLE auth (
@@ -16,3 +18,12 @@ CREATE TABLE tokens (
16); 18);
17 19
18COMMIT; 20COMMIT;
21
22:VERSION 2
23
24BEGIN TRANSACTION;
25
26INSERT INTO auth (UUID, passwordHash, passwordSalt, webLoginKey) SELECT `UUID` AS UUID, `passwordHash` AS passwordHash, `passwordSalt` AS passwordSalt, `webLoginKey` AS webLoginKey FROM users;
27
28COMMIT;
29
diff --git a/OpenSim/Data/SQLite/Resources/001_Avatar.sql b/OpenSim/Data/SQLite/Resources/Avatar.migrations
index 7ec906b..13b4196 100644
--- a/OpenSim/Data/SQLite/Resources/001_Avatar.sql
+++ b/OpenSim/Data/SQLite/Resources/Avatar.migrations
@@ -1,3 +1,5 @@
1:VERSION 1
2
1BEGIN TRANSACTION; 3BEGIN TRANSACTION;
2 4
3CREATE TABLE Avatars ( 5CREATE TABLE Avatars (
diff --git a/OpenSim/Data/SQLite/Resources/001_FriendsStore.sql b/OpenSim/Data/SQLite/Resources/FriendsStore.migrations
index f1b9ab9..3eb4352 100644
--- a/OpenSim/Data/SQLite/Resources/001_FriendsStore.sql
+++ b/OpenSim/Data/SQLite/Resources/FriendsStore.migrations
@@ -1,3 +1,5 @@
1:VERSION 1
2
1BEGIN TRANSACTION; 3BEGIN TRANSACTION;
2 4
3CREATE TABLE `Friends` ( 5CREATE TABLE `Friends` (
@@ -8,3 +10,11 @@ CREATE TABLE `Friends` (
8 PRIMARY KEY(`PrincipalID`, `Friend`)); 10 PRIMARY KEY(`PrincipalID`, `Friend`));
9 11
10COMMIT; 12COMMIT;
13
14:VERSION 2
15
16BEGIN TRANSACTION;
17
18INSERT INTO `Friends` SELECT `ownerID`, `friendID`, `friendPerms`, 0 FROM `userfriends`;
19
20COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/004_InventoryStore.sql b/OpenSim/Data/SQLite/Resources/InventoryStore.migrations
index e8f4d46..585ac49 100644
--- a/OpenSim/Data/SQLite/Resources/004_InventoryStore.sql
+++ b/OpenSim/Data/SQLite/Resources/InventoryStore.migrations
@@ -1,3 +1,59 @@
1:VERSION 1
2
3BEGIN TRANSACTION;
4
5CREATE TABLE inventoryfolders(
6 UUID varchar(255) primary key,
7 name varchar(255),
8 agentID varchar(255),
9 parentID varchar(255),
10 type integer,
11 version integer);
12
13CREATE TABLE inventoryitems(
14 UUID varchar(255) primary key,
15 assetID varchar(255),
16 assetType integer,
17 invType integer,
18 parentFolderID varchar(255),
19 avatarID varchar(255),
20 creatorsID varchar(255),
21 inventoryName varchar(255),
22 inventoryDescription varchar(255),
23 inventoryNextPermissions integer,
24 inventoryCurrentPermissions integer,
25 inventoryBasePermissions integer,
26 inventoryEveryOnePermissions integer,
27 salePrice integer default 99,
28 saleType integer default 0,
29 creationDate integer default 2000,
30 groupID varchar(255) default '00000000-0000-0000-0000-000000000000',
31 groupOwned integer default 0,
32 flags integer default 0);
33
34COMMIT;
35
36:VERSION 2
37
38BEGIN TRANSACTION;
39
40create index inventoryfolders_agentid on inventoryfolders(agentid);
41create index inventoryfolders_parentid on inventoryfolders(parentid);
42create index inventoryitems_parentfolderid on inventoryitems(parentfolderid);
43create index inventoryitems_avatarid on inventoryitems(avatarid);
44
45COMMIT;
46
47:VERSION 3
48
49BEGIN;
50
51alter table inventoryitems add column inventoryGroupPermissions integer unsigned not null default 0;
52
53COMMIT;
54
55:VERSION 4
56
1BEGIN; 57BEGIN;
2 58
3update inventoryitems 59update inventoryitems
diff --git a/OpenSim/Data/SQLite/Resources/RegionStore.migrations b/OpenSim/Data/SQLite/Resources/RegionStore.migrations
new file mode 100644
index 0000000..7b27378
--- /dev/null
+++ b/OpenSim/Data/SQLite/Resources/RegionStore.migrations
@@ -0,0 +1,526 @@
1:VERSION 1
2
3BEGIN TRANSACTION;
4
5CREATE TABLE prims(
6 UUID varchar(255) primary key,
7 RegionUUID varchar(255),
8 ParentID integer,
9 CreationDate integer,
10 Name varchar(255),
11 SceneGroupID varchar(255),
12 Text varchar(255),
13 Description varchar(255),
14 SitName varchar(255),
15 TouchName varchar(255),
16 CreatorID varchar(255),
17 OwnerID varchar(255),
18 GroupID varchar(255),
19 LastOwnerID varchar(255),
20 OwnerMask integer,
21 NextOwnerMask integer,
22 GroupMask integer,
23 EveryoneMask integer,
24 BaseMask integer,
25 PositionX float,
26 PositionY float,
27 PositionZ float,
28 GroupPositionX float,
29 GroupPositionY float,
30 GroupPositionZ float,
31 VelocityX float,
32 VelocityY float,
33 VelocityZ float,
34 AngularVelocityX float,
35 AngularVelocityY float,
36 AngularVelocityZ float,
37 AccelerationX float,
38 AccelerationY float,
39 AccelerationZ float,
40 RotationX float,
41 RotationY float,
42 RotationZ float,
43 RotationW float,
44 ObjectFlags integer,
45 SitTargetOffsetX float NOT NULL default 0,
46 SitTargetOffsetY float NOT NULL default 0,
47 SitTargetOffsetZ float NOT NULL default 0,
48 SitTargetOrientW float NOT NULL default 0,
49 SitTargetOrientX float NOT NULL default 0,
50 SitTargetOrientY float NOT NULL default 0,
51 SitTargetOrientZ float NOT NULL default 0);
52
53CREATE TABLE primshapes(
54 UUID varchar(255) primary key,
55 Shape integer,
56 ScaleX float,
57 ScaleY float,
58 ScaleZ float,
59 PCode integer,
60 PathBegin integer,
61 PathEnd integer,
62 PathScaleX integer,
63 PathScaleY integer,
64 PathShearX integer,
65 PathShearY integer,
66 PathSkew integer,
67 PathCurve integer,
68 PathRadiusOffset integer,
69 PathRevolutions integer,
70 PathTaperX integer,
71 PathTaperY integer,
72 PathTwist integer,
73 PathTwistBegin integer,
74 ProfileBegin integer,
75 ProfileEnd integer,
76 ProfileCurve integer,
77 ProfileHollow integer,
78 Texture blob,
79 ExtraParams blob,
80 State Integer NOT NULL default 0);
81
82CREATE TABLE primitems(
83 itemID varchar(255) primary key,
84 primID varchar(255),
85 assetID varchar(255),
86 parentFolderID varchar(255),
87 invType integer,
88 assetType integer,
89 name varchar(255),
90 description varchar(255),
91 creationDate integer,
92 creatorID varchar(255),
93 ownerID varchar(255),
94 lastOwnerID varchar(255),
95 groupID varchar(255),
96 nextPermissions string,
97 currentPermissions string,
98 basePermissions string,
99 everyonePermissions string,
100 groupPermissions string);
101
102CREATE TABLE terrain(
103 RegionUUID varchar(255),
104 Revision integer,
105 Heightfield blob);
106
107CREATE TABLE land(
108 UUID varchar(255) primary key,
109 RegionUUID varchar(255),
110 LocalLandID string,
111 Bitmap blob,
112 Name varchar(255),
113 Desc varchar(255),
114 OwnerUUID varchar(255),
115 IsGroupOwned string,
116 Area integer,
117 AuctionID integer,
118 Category integer,
119 ClaimDate integer,
120 ClaimPrice integer,
121 GroupUUID varchar(255),
122 SalePrice integer,
123 LandStatus integer,
124 LandFlags string,
125 LandingType string,
126 MediaAutoScale string,
127 MediaTextureUUID varchar(255),
128 MediaURL varchar(255),
129 MusicURL varchar(255),
130 PassHours float,
131 PassPrice string,
132 SnapshotUUID varchar(255),
133 UserLocationX float,
134 UserLocationY float,
135 UserLocationZ float,
136 UserLookAtX float,
137 UserLookAtY float,
138 UserLookAtZ float,
139 AuthbuyerID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000');
140
141CREATE TABLE landaccesslist(
142 LandUUID varchar(255),
143 AccessUUID varchar(255),
144 Flags string);
145
146COMMIT;
147
148:VERSION 2
149
150BEGIN TRANSACTION;
151
152CREATE TABLE regionban(
153 regionUUID varchar (255),
154 bannedUUID varchar (255),
155 bannedIp varchar (255),
156 bannedIpHostMask varchar (255)
157 );
158
159COMMIT;
160
161:VERSION 3
162
163BEGIN;
164
165ALTER TABLE primitems add flags integer not null default 0;
166
167COMMIT;
168
169:VERSION 4
170
171BEGIN;
172
173create table regionsettings (
174 regionUUID char(36) not null,
175 block_terraform integer not null,
176 block_fly integer not null,
177 allow_damage integer not null,
178 restrict_pushing integer not null,
179 allow_land_resell integer not null,
180 allow_land_join_divide integer not null,
181 block_show_in_search integer not null,
182 agent_limit integer not null,
183 object_bonus float not null,
184 maturity integer not null,
185 disable_scripts integer not null,
186 disable_collisions integer not null,
187 disable_physics integer not null,
188 terrain_texture_1 char(36) not null,
189 terrain_texture_2 char(36) not null,
190 terrain_texture_3 char(36) not null,
191 terrain_texture_4 char(36) not null,
192 elevation_1_nw float not null,
193 elevation_2_nw float not null,
194 elevation_1_ne float not null,
195 elevation_2_ne float not null,
196 elevation_1_se float not null,
197 elevation_2_se float not null,
198 elevation_1_sw float not null,
199 elevation_2_sw float not null,
200 water_height float not null,
201 terrain_raise_limit float not null,
202 terrain_lower_limit float not null,
203 use_estate_sun integer not null,
204 fixed_sun integer not null,
205 sun_position float not null,
206 covenant char(36));
207
208COMMIT;
209
210:VERSION 5
211
212BEGIN;
213
214delete from regionsettings;
215
216COMMIT;
217
218:VERSION 6
219
220BEGIN TRANSACTION;
221
222CREATE TABLE estate_groups (
223 EstateID int(10) NOT NULL,
224 uuid char(36) NOT NULL
225);
226
227CREATE TABLE estate_managers (
228 EstateID int(10) NOT NULL,
229 uuid char(36) NOT NULL
230);
231
232CREATE TABLE estate_map (
233 RegionID char(36) NOT NULL default '00000000-0000-0000-0000-000000000000',
234 EstateID int(11) NOT NULL
235);
236
237CREATE TABLE estate_settings (
238 EstateID INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
239 EstateName varchar(64) default NULL,
240 AbuseEmailToEstateOwner tinyint(4) NOT NULL,
241 DenyAnonymous tinyint(4) NOT NULL,
242 ResetHomeOnTeleport tinyint(4) NOT NULL,
243 FixedSun tinyint(4) NOT NULL,
244 DenyTransacted tinyint(4) NOT NULL,
245 BlockDwell tinyint(4) NOT NULL,
246 DenyIdentified tinyint(4) NOT NULL,
247 AllowVoice tinyint(4) NOT NULL,
248 UseGlobalTime tinyint(4) NOT NULL,
249 PricePerMeter int(11) NOT NULL,
250 TaxFree tinyint(4) NOT NULL,
251 AllowDirectTeleport tinyint(4) NOT NULL,
252 RedirectGridX int(11) NOT NULL,
253 RedirectGridY int(11) NOT NULL,
254 ParentEstateID int(10) NOT NULL,
255 SunPosition double NOT NULL,
256 EstateSkipScripts tinyint(4) NOT NULL,
257 BillableFactor float NOT NULL,
258 PublicAccess tinyint(4) NOT NULL
259);
260insert into estate_settings (EstateID,EstateName,AbuseEmailToEstateOwner,DenyAnonymous,ResetHomeOnTeleport,FixedSun,DenyTransacted,BlockDwell,DenyIdentified,AllowVoice,UseGlobalTime,PricePerMeter,TaxFree,AllowDirectTeleport,RedirectGridX,RedirectGridY,ParentEstateID,SunPosition,PublicAccess,EstateSkipScripts,BillableFactor) values ( 99, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '');
261delete from estate_settings;
262CREATE TABLE estate_users (
263 EstateID int(10) NOT NULL,
264 uuid char(36) NOT NULL
265);
266
267CREATE TABLE estateban (
268 EstateID int(10) NOT NULL,
269 bannedUUID varchar(36) NOT NULL,
270 bannedIp varchar(16) NOT NULL,
271 bannedIpHostMask varchar(16) NOT NULL,
272 bannedNameMask varchar(64) default NULL
273);
274
275drop table regionsettings;
276CREATE TABLE regionsettings (
277 regionUUID char(36) NOT NULL,
278 block_terraform int(11) NOT NULL,
279 block_fly int(11) NOT NULL,
280 allow_damage int(11) NOT NULL,
281 restrict_pushing int(11) NOT NULL,
282 allow_land_resell int(11) NOT NULL,
283 allow_land_join_divide int(11) NOT NULL,
284 block_show_in_search int(11) NOT NULL,
285 agent_limit int(11) NOT NULL,
286 object_bonus float NOT NULL,
287 maturity int(11) NOT NULL,
288 disable_scripts int(11) NOT NULL,
289 disable_collisions int(11) NOT NULL,
290 disable_physics int(11) NOT NULL,
291 terrain_texture_1 char(36) NOT NULL,
292 terrain_texture_2 char(36) NOT NULL,
293 terrain_texture_3 char(36) NOT NULL,
294 terrain_texture_4 char(36) NOT NULL,
295 elevation_1_nw float NOT NULL,
296 elevation_2_nw float NOT NULL,
297 elevation_1_ne float NOT NULL,
298 elevation_2_ne float NOT NULL,
299 elevation_1_se float NOT NULL,
300 elevation_2_se float NOT NULL,
301 elevation_1_sw float NOT NULL,
302 elevation_2_sw float NOT NULL,
303 water_height float NOT NULL,
304 terrain_raise_limit float NOT NULL,
305 terrain_lower_limit float NOT NULL,
306 use_estate_sun int(11) NOT NULL,
307 fixed_sun int(11) NOT NULL,
308 sun_position float NOT NULL,
309 covenant char(36) default NULL,
310 Sandbox tinyint(4) NOT NULL,
311 PRIMARY KEY (regionUUID)
312);
313
314CREATE INDEX estate_ban_estate_id on estateban(EstateID);
315CREATE INDEX estate_groups_estate_id on estate_groups(EstateID);
316CREATE INDEX estate_managers_estate_id on estate_managers(EstateID);
317CREATE INDEX estate_map_estate_id on estate_map(EstateID);
318CREATE UNIQUE INDEX estate_map_region_id on estate_map(RegionID);
319CREATE INDEX estate_users_estate_id on estate_users(EstateID);
320
321COMMIT;
322
323:VERSION 7
324
325begin;
326
327alter table estate_settings add column AbuseEmail varchar(255) not null default '';
328
329alter table estate_settings add column EstateOwner varchar(36) not null default '';
330
331commit;
332
333:VERSION 8
334
335begin;
336
337alter table estate_settings add column DenyMinors tinyint not null default 0;
338
339commit;
340
341:VERSION 9
342
343BEGIN;
344
345ALTER TABLE prims ADD COLUMN ColorR integer not null default 0;
346ALTER TABLE prims ADD COLUMN ColorG integer not null default 0;
347ALTER TABLE prims ADD COLUMN ColorB integer not null default 0;
348ALTER TABLE prims ADD COLUMN ColorA integer not null default 0;
349
350COMMIT;
351
352:VERSION 10
353
354BEGIN;
355
356ALTER TABLE prims ADD COLUMN ClickAction INTEGER NOT NULL default 0;
357
358COMMIT;
359
360:VERSION 11
361
362BEGIN;
363
364ALTER TABLE prims ADD COLUMN PayPrice INTEGER NOT NULL default 0;
365ALTER TABLE prims ADD COLUMN PayButton1 INTEGER NOT NULL default 0;
366ALTER TABLE prims ADD COLUMN PayButton2 INTEGER NOT NULL default 0;
367ALTER TABLE prims ADD COLUMN PayButton3 INTEGER NOT NULL default 0;
368ALTER TABLE prims ADD COLUMN PayButton4 INTEGER NOT NULL default 0;
369ALTER TABLE prims ADD COLUMN LoopedSound varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000';
370ALTER TABLE prims ADD COLUMN LoopedSoundGain float NOT NULL default 0;
371ALTER TABLE prims ADD COLUMN TextureAnimation string;
372ALTER TABLE prims ADD COLUMN ParticleSystem string;
373ALTER TABLE prims ADD COLUMN OmegaX float NOT NULL default 0;
374ALTER TABLE prims ADD COLUMN OmegaY float NOT NULL default 0;
375ALTER TABLE prims ADD COLUMN OmegaZ float NOT NULL default 0;
376ALTER TABLE prims ADD COLUMN CameraEyeOffsetX float NOT NULL default 0;
377ALTER TABLE prims ADD COLUMN CameraEyeOffsetY float NOT NULL default 0;
378ALTER TABLE prims ADD COLUMN CameraEyeOffsetZ float NOT NULL default 0;
379ALTER TABLE prims ADD COLUMN CameraAtOffsetX float NOT NULL default 0;
380ALTER TABLE prims ADD COLUMN CameraAtOffsetY float NOT NULL default 0;
381ALTER TABLE prims ADD COLUMN CameraAtOffsetZ float NOT NULL default 0;
382ALTER TABLE prims ADD COLUMN ForceMouselook string NOT NULL default 0;
383ALTER TABLE prims ADD COLUMN ScriptAccessPin INTEGER NOT NULL default 0;
384ALTER TABLE prims ADD COLUMN AllowedDrop INTEGER NOT NULL default 0;
385ALTER TABLE prims ADD COLUMN DieAtEdge string NOT NULL default 0;
386ALTER TABLE prims ADD COLUMN SalePrice INTEGER NOT NULL default 0;
387ALTER TABLE prims ADD COLUMN SaleType string NOT NULL default 0;
388
389COMMIT;
390
391:VERSION 12
392
393BEGIN;
394
395ALTER TABLE prims ADD COLUMN Material INTEGER NOT NULL default 3;
396
397COMMIT;
398
399:VERSION 13
400
401BEGIN;
402
403ALTER TABLE land ADD COLUMN OtherCleanTime INTEGER NOT NULL default 0;
404ALTER TABLE land ADD COLUMN Dwell INTEGER NOT NULL default 0;
405
406COMMIT;
407
408:VERSION 14
409
410begin;
411
412ALTER TABLE regionsettings ADD COLUMN sunvectorx double NOT NULL default 0;
413ALTER TABLE regionsettings ADD COLUMN sunvectory double NOT NULL default 0;
414ALTER TABLE regionsettings ADD COLUMN sunvectorz double NOT NULL default 0;
415
416commit;
417
418:VERSION 15
419
420BEGIN;
421
422ALTER TABLE prims ADD COLUMN CollisionSound varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000';
423ALTER TABLE prims ADD COLUMN CollisionSoundVolume float NOT NULL default 0;
424
425COMMIT;
426
427:VERSION 16
428
429BEGIN;
430
431ALTER TABLE prims ADD COLUMN VolumeDetect INTEGER NOT NULL DEFAULT 0;
432
433COMMIT;
434
435:VERSION 17
436
437BEGIN;
438CREATE TEMPORARY TABLE prims_backup(UUID,RegionUUID,CreationDate,Name,SceneGroupID,Text,Description,SitName,TouchName,CreatorID,OwnerID,GroupID,LastOwnerID,OwnerMask,NextOwnerMask,GroupMask,EveryoneMask,BaseMask,PositionX,PositionY,PositionZ,GroupPositionX,GroupPositionY,GroupPositionZ,VelocityX,VelocityY,VelocityZ,AngularVelocityX,AngularVelocityY,AngularVelocityZ,AccelerationX,AccelerationY,AccelerationZ,RotationX,RotationY,RotationZ,RotationW,ObjectFlags,SitTargetOffsetX,SitTargetOffsetY,SitTargetOffsetZ,SitTargetOrientW,SitTargetOrientX,SitTargetOrientY,SitTargetOrientZ,ColorR,ColorG,ColorB,ColorA,ClickAction,PayPrice,PayButton1,PayButton2,PayButton3,PayButton4,LoopedSound,LoopedSoundGain,TextureAnimation,ParticleSystem,OmegaX,OmegaY,OmegaZ,CameraEyeOffsetX,CameraEyeOffsetY,CameraEyeOffsetZ,CameraAtOffsetX,CameraAtOffsetY,CameraAtOffsetZ,ForceMouselook,ScriptAccessPin,AllowedDrop,DieAtEdge,SalePrice,SaleType,Material,CollisionSound,CollisionSoundVolume,VolumeDetect);
439INSERT INTO prims_backup SELECT UUID,RegionUUID,CreationDate,Name,SceneGroupID,Text,Description,SitName,TouchName,CreatorID,OwnerID,GroupID,LastOwnerID,OwnerMask,NextOwnerMask,GroupMask,EveryoneMask,BaseMask,PositionX,PositionY,PositionZ,GroupPositionX,GroupPositionY,GroupPositionZ,VelocityX,VelocityY,VelocityZ,AngularVelocityX,AngularVelocityY,AngularVelocityZ,AccelerationX,AccelerationY,AccelerationZ,RotationX,RotationY,RotationZ,RotationW,ObjectFlags,SitTargetOffsetX,SitTargetOffsetY,SitTargetOffsetZ,SitTargetOrientW,SitTargetOrientX,SitTargetOrientY,SitTargetOrientZ,ColorR,ColorG,ColorB,ColorA,ClickAction,PayPrice,PayButton1,PayButton2,PayButton3,PayButton4,LoopedSound,LoopedSoundGain,TextureAnimation,ParticleSystem,OmegaX,OmegaY,OmegaZ,CameraEyeOffsetX,CameraEyeOffsetY,CameraEyeOffsetZ,CameraAtOffsetX,CameraAtOffsetY,CameraAtOffsetZ,ForceMouselook,ScriptAccessPin,AllowedDrop,DieAtEdge,SalePrice,SaleType,Material,CollisionSound,CollisionSoundVolume,VolumeDetect FROM prims;
440DROP TABLE prims;
441CREATE TABLE prims(UUID,RegionUUID,CreationDate,Name,SceneGroupID,Text,Description,SitName,TouchName,CreatorID,OwnerID,GroupID,LastOwnerID,OwnerMask,NextOwnerMask,GroupMask,EveryoneMask,BaseMask,PositionX,PositionY,PositionZ,GroupPositionX,GroupPositionY,GroupPositionZ,VelocityX,VelocityY,VelocityZ,AngularVelocityX,AngularVelocityY,AngularVelocityZ,AccelerationX,AccelerationY,AccelerationZ,RotationX,RotationY,RotationZ,RotationW,ObjectFlags,SitTargetOffsetX,SitTargetOffsetY,SitTargetOffsetZ,SitTargetOrientW,SitTargetOrientX,SitTargetOrientY,SitTargetOrientZ,ColorR,ColorG,ColorB,ColorA,ClickAction,PayPrice,PayButton1,PayButton2,PayButton3,PayButton4,LoopedSound,LoopedSoundGain,TextureAnimation,ParticleSystem,OmegaX,OmegaY,OmegaZ,CameraEyeOffsetX,CameraEyeOffsetY,CameraEyeOffsetZ,CameraAtOffsetX,CameraAtOffsetY,CameraAtOffsetZ,ForceMouselook,ScriptAccessPin,AllowedDrop,DieAtEdge,SalePrice,SaleType,Material,CollisionSound,CollisionSoundVolume,VolumeDetect);
442INSERT INTO prims SELECT UUID,RegionUUID,CreationDate,Name,SceneGroupID,Text,Description,SitName,TouchName,CreatorID,OwnerID,GroupID,LastOwnerID,OwnerMask,NextOwnerMask,GroupMask,EveryoneMask,BaseMask,PositionX,PositionY,PositionZ,GroupPositionX,GroupPositionY,GroupPositionZ,VelocityX,VelocityY,VelocityZ,AngularVelocityX,AngularVelocityY,AngularVelocityZ,AccelerationX,AccelerationY,AccelerationZ,RotationX,RotationY,RotationZ,RotationW,ObjectFlags,SitTargetOffsetX,SitTargetOffsetY,SitTargetOffsetZ,SitTargetOrientW,SitTargetOrientX,SitTargetOrientY,SitTargetOrientZ,ColorR,ColorG,ColorB,ColorA,ClickAction,PayPrice,PayButton1,PayButton2,PayButton3,PayButton4,LoopedSound,LoopedSoundGain,TextureAnimation,ParticleSystem,OmegaX,OmegaY,OmegaZ,CameraEyeOffsetX,CameraEyeOffsetY,CameraEyeOffsetZ,CameraAtOffsetX,CameraAtOffsetY,CameraAtOffsetZ,ForceMouselook,ScriptAccessPin,AllowedDrop,DieAtEdge,SalePrice,SaleType,Material,CollisionSound,CollisionSoundVolume,VolumeDetect FROM prims_backup;
443DROP TABLE prims_backup;
444COMMIT;
445
446:VERSION 18
447
448BEGIN;
449
450update terrain
451 set RegionUUID = substr(RegionUUID, 1, 8) || "-" || substr(RegionUUID, 9, 4) || "-" || substr(RegionUUID, 13, 4) || "-" || substr(RegionUUID, 17, 4) || "-" || substr(RegionUUID, 21, 12)
452 where RegionUUID not like '%-%';
453
454
455update landaccesslist
456 set LandUUID = substr(LandUUID, 1, 8) || "-" || substr(LandUUID, 9, 4) || "-" || substr(LandUUID, 13, 4) || "-" || substr(LandUUID, 17, 4) || "-" || substr(LandUUID, 21, 12)
457 where LandUUID not like '%-%';
458
459update landaccesslist
460 set AccessUUID = substr(AccessUUID, 1, 8) || "-" || substr(AccessUUID, 9, 4) || "-" || substr(AccessUUID, 13, 4) || "-" || substr(AccessUUID, 17, 4) || "-" || substr(AccessUUID, 21, 12)
461 where AccessUUID not like '%-%';
462
463
464update prims
465 set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12)
466 where UUID not like '%-%';
467
468update prims
469 set RegionUUID = substr(RegionUUID, 1, 8) || "-" || substr(RegionUUID, 9, 4) || "-" || substr(RegionUUID, 13, 4) || "-" || substr(RegionUUID, 17, 4) || "-" || substr(RegionUUID, 21, 12)
470 where RegionUUID not like '%-%';
471
472update prims
473 set SceneGroupID = substr(SceneGroupID, 1, 8) || "-" || substr(SceneGroupID, 9, 4) || "-" || substr(SceneGroupID, 13, 4) || "-" || substr(SceneGroupID, 17, 4) || "-" || substr(SceneGroupID, 21, 12)
474 where SceneGroupID not like '%-%';
475
476update prims
477 set CreatorID = substr(CreatorID, 1, 8) || "-" || substr(CreatorID, 9, 4) || "-" || substr(CreatorID, 13, 4) || "-" || substr(CreatorID, 17, 4) || "-" || substr(CreatorID, 21, 12)
478 where CreatorID not like '%-%';
479
480update prims
481 set OwnerID = substr(OwnerID, 1, 8) || "-" || substr(OwnerID, 9, 4) || "-" || substr(OwnerID, 13, 4) || "-" || substr(OwnerID, 17, 4) || "-" || substr(OwnerID, 21, 12)
482 where OwnerID not like '%-%';
483
484update prims
485 set GroupID = substr(GroupID, 1, 8) || "-" || substr(GroupID, 9, 4) || "-" || substr(GroupID, 13, 4) || "-" || substr(GroupID, 17, 4) || "-" || substr(GroupID, 21, 12)
486 where GroupID not like '%-%';
487
488update prims
489 set LastOwnerID = substr(LastOwnerID, 1, 8) || "-" || substr(LastOwnerID, 9, 4) || "-" || substr(LastOwnerID, 13, 4) || "-" || substr(LastOwnerID, 17, 4) || "-" || substr(LastOwnerID, 21, 12)
490 where LastOwnerID not like '%-%';
491
492
493update primshapes
494 set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12)
495 where UUID not like '%-%';
496
497
498update land
499 set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12)
500 where UUID not like '%-%';
501
502update land
503 set RegionUUID = substr(RegionUUID, 1, 8) || "-" || substr(RegionUUID, 9, 4) || "-" || substr(RegionUUID, 13, 4) || "-" || substr(RegionUUID, 17, 4) || "-" || substr(RegionUUID, 21, 12)
504 where RegionUUID not like '%-%';
505
506update land
507 set OwnerUUID = substr(OwnerUUID, 1, 8) || "-" || substr(OwnerUUID, 9, 4) || "-" || substr(OwnerUUID, 13, 4) || "-" || substr(OwnerUUID, 17, 4) || "-" || substr(OwnerUUID, 21, 12)
508 where OwnerUUID not like '%-%';
509
510update land
511 set GroupUUID = substr(GroupUUID, 1, 8) || "-" || substr(GroupUUID, 9, 4) || "-" || substr(GroupUUID, 13, 4) || "-" || substr(GroupUUID, 17, 4) || "-" || substr(GroupUUID, 21, 12)
512 where GroupUUID not like '%-%';
513
514update land
515 set MediaTextureUUID = substr(MediaTextureUUID, 1, 8) || "-" || substr(MediaTextureUUID, 9, 4) || "-" || substr(MediaTextureUUID, 13, 4) || "-" || substr(MediaTextureUUID, 17, 4) || "-" || substr(MediaTextureUUID, 21, 12)
516 where MediaTextureUUID not like '%-%';
517
518update land
519 set SnapshotUUID = substr(SnapshotUUID, 1, 8) || "-" || substr(SnapshotUUID, 9, 4) || "-" || substr(SnapshotUUID, 13, 4) || "-" || substr(SnapshotUUID, 17, 4) || "-" || substr(SnapshotUUID, 21, 12)
520 where SnapshotUUID not like '%-%';
521
522update land
523 set AuthbuyerID = substr(AuthbuyerID, 1, 8) || "-" || substr(AuthbuyerID, 9, 4) || "-" || substr(AuthbuyerID, 13, 4) || "-" || substr(AuthbuyerID, 17, 4) || "-" || substr(AuthbuyerID, 21, 12)
524 where AuthbuyerID not like '%-%';
525
526COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/001_UserAccount.sql b/OpenSim/Data/SQLite/Resources/UserAccount.migrations
index c38d9a7..854fe69 100644
--- a/OpenSim/Data/SQLite/Resources/001_UserAccount.sql
+++ b/OpenSim/Data/SQLite/Resources/UserAccount.migrations
@@ -1,4 +1,6 @@
1BEGIN TRANSACTION; 1:VERSION 1
2
3BEGIN TRANSACTION;
2 4
3-- useraccounts table 5-- useraccounts table
4CREATE TABLE UserAccounts ( 6CREATE TABLE UserAccounts (
@@ -14,4 +16,12 @@ CREATE TABLE UserAccounts (
14 UserTitle varchar(64) NOT NULL DEFAULT '' 16 UserTitle varchar(64) NOT NULL DEFAULT ''
15); 17);
16 18
17COMMIT; \ No newline at end of file 19COMMIT;
20
21:VERSION 2
22
23BEGIN TRANSACTION;
24
25INSERT INTO UserAccounts (PrincipalID, ScopeID, FirstName, LastName, Email, ServiceURLs, Created) SELECT `UUID` AS PrincipalID, '00000000-0000-0000-0000-000000000000' AS ScopeID, username AS FirstName, surname AS LastName, '' as Email, '' AS ServiceURLs, created as Created FROM users;
26
27COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/UserStore.migrations b/OpenSim/Data/SQLite/Resources/UserStore.migrations
new file mode 100644
index 0000000..73d35e8
--- /dev/null
+++ b/OpenSim/Data/SQLite/Resources/UserStore.migrations
@@ -0,0 +1,169 @@
1:VERSION 1
2
3BEGIN TRANSACTION;
4
5-- users table
6CREATE TABLE users(
7 UUID varchar(255) primary key,
8 username varchar(255),
9 surname varchar(255),
10 passwordHash varchar(255),
11 passwordSalt varchar(255),
12 homeRegionX integer,
13 homeRegionY integer,
14 homeLocationX float,
15 homeLocationY float,
16 homeLocationZ float,
17 homeLookAtX float,
18 homeLookAtY float,
19 homeLookAtZ float,
20 created integer,
21 lastLogin integer,
22 rootInventoryFolderID varchar(255),
23 userInventoryURI varchar(255),
24 userAssetURI varchar(255),
25 profileCanDoMask integer,
26 profileWantDoMask integer,
27 profileAboutText varchar(255),
28 profileFirstText varchar(255),
29 profileImage varchar(255),
30 profileFirstImage varchar(255),
31 webLoginKey text default '00000000-0000-0000-0000-000000000000');
32-- friends table
33CREATE TABLE userfriends(
34 ownerID varchar(255),
35 friendID varchar(255),
36 friendPerms integer,
37 ownerPerms integer,
38 datetimestamp integer);
39
40COMMIT;
41
42:VERSION 2
43
44BEGIN;
45
46ALTER TABLE users add homeRegionID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000';
47
48COMMIT;
49
50:VERSION 3
51
52BEGIN;
53
54ALTER TABLE users add userFlags integer NOT NULL default 0;
55ALTER TABLE users add godLevel integer NOT NULL default 0;
56
57COMMIT;
58
59:VERSION 4
60
61BEGIN;
62
63ALTER TABLE users add customType varchar(32) not null default '';
64ALTER TABLE users add partner char(36) not null default '00000000-0000-0000-0000-000000000000';
65
66COMMIT;
67
68:VERSION 5
69
70BEGIN;
71
72CREATE TABLE `avatarattachments` (`UUID` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', `attachpoint` int(11) NOT NULL DEFAULT 0, `item` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', `asset` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000');
73
74COMMIT;
75
76:VERSION 6
77
78BEGIN TRANSACTION;
79
80-- usersagents table
81CREATE TABLE IF NOT EXISTS useragents(
82 UUID varchar(255) primary key,
83 agentIP varchar(255),
84 agentPort integer,
85 agentOnline boolean,
86 sessionID varchar(255),
87 secureSessionID varchar(255),
88 regionID varchar(255),
89 loginTime integer,
90 logoutTime integer,
91 currentRegion varchar(255),
92 currentHandle varchar(255),
93 currentPosX float,
94 currentPosY float,
95 currentPosZ float);
96
97COMMIT;
98
99:VERSION 7
100
101BEGIN TRANSACTION;
102
103ALTER TABLE useragents add currentLookAtX float not null default 128;
104ALTER TABLE useragents add currentLookAtY float not null default 128;
105ALTER TABLE useragents add currentLookAtZ float not null default 70;
106
107COMMIT;
108
109:VERSION 8
110
111BEGIN TRANSACTION;
112
113ALTER TABLE users add email varchar(250);
114
115COMMIT;
116
117:VERSION 9
118
119BEGIN;
120
121update users
122 set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12)
123 where UUID not like '%-%';
124
125update useragents
126 set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12)
127 where UUID not like '%-%';
128
129COMMIT;
130
131:VERSION 10
132
133BEGIN TRANSACTION;
134
135CREATE TABLE IF NOT EXISTS avatarappearance(
136 Owner varchar(36) NOT NULL primary key,
137 BodyItem varchar(36) DEFAULT NULL,
138 BodyAsset varchar(36) DEFAULT NULL,
139 SkinItem varchar(36) DEFAULT NULL,
140 SkinAsset varchar(36) DEFAULT NULL,
141 HairItem varchar(36) DEFAULT NULL,
142 HairAsset varchar(36) DEFAULT NULL,
143 EyesItem varchar(36) DEFAULT NULL,
144 EyesAsset varchar(36) DEFAULT NULL,
145 ShirtItem varchar(36) DEFAULT NULL,
146 ShirtAsset varchar(36) DEFAULT NULL,
147 PantsItem varchar(36) DEFAULT NULL,
148 PantsAsset varchar(36) DEFAULT NULL,
149 ShoesItem varchar(36) DEFAULT NULL,
150 ShoesAsset varchar(36) DEFAULT NULL,
151 SocksItem varchar(36) DEFAULT NULL,
152 SocksAsset varchar(36) DEFAULT NULL,
153 JacketItem varchar(36) DEFAULT NULL,
154 JacketAsset varchar(36) DEFAULT NULL,
155 GlovesItem varchar(36) DEFAULT NULL,
156 GlovesAsset varchar(36) DEFAULT NULL,
157 UnderShirtItem varchar(36) DEFAULT NULL,
158 UnderShirtAsset varchar(36) DEFAULT NULL,
159 UnderPantsItem varchar(36) DEFAULT NULL,
160 UnderPantsAsset varchar(36) DEFAULT NULL,
161 SkirtItem varchar(36) DEFAULT NULL,
162 SkirtAsset varchar(36) DEFAULT NULL,
163 Texture blob,
164 VisualParams blob,
165 Serial int DEFAULT NULL,
166 AvatarHeight float DEFAULT NULL
167);
168
169COMMIT;