aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/SQLite
diff options
context:
space:
mode:
authorDiva Canto2010-06-08 15:47:14 -0700
committerDiva Canto2010-06-08 15:47:14 -0700
commit9b9804a498a3d48e7356c0a2cd12bf98887f5a53 (patch)
tree8a64306d9000c52f99f5682fdb54d4a3d90b70bf /OpenSim/Data/SQLite
parentImprove instructions for [Groups] setup in OpenSim.ini.example (diff)
downloadopensim-SC_OLD-9b9804a498a3d48e7356c0a2cd12bf98887f5a53.zip
opensim-SC_OLD-9b9804a498a3d48e7356c0a2cd12bf98887f5a53.tar.gz
opensim-SC_OLD-9b9804a498a3d48e7356c0a2cd12bf98887f5a53.tar.bz2
opensim-SC_OLD-9b9804a498a3d48e7356c0a2cd12bf98887f5a53.tar.xz
* Changed CreatorIDs consistently to varchar(128)
* Deleted redundant migration for assets in SQLite * Rewrote XInventory migrations in SQLite in the new style
Diffstat (limited to 'OpenSim/Data/SQLite')
-rw-r--r--OpenSim/Data/SQLite/Resources/001_XInventoryStore.sql38
-rw-r--r--OpenSim/Data/SQLite/Resources/002_XInventoryStore.sql8
-rw-r--r--OpenSim/Data/SQLite/Resources/005_AssetStore.sql5
-rw-r--r--OpenSim/Data/SQLite/Resources/AssetStore.migrations3
-rw-r--r--OpenSim/Data/SQLite/Resources/XInventoryStore.migrations51
5 files changed, 53 insertions, 52 deletions
diff --git a/OpenSim/Data/SQLite/Resources/001_XInventoryStore.sql b/OpenSim/Data/SQLite/Resources/001_XInventoryStore.sql
deleted file mode 100644
index 7e21996..0000000
--- a/OpenSim/Data/SQLite/Resources/001_XInventoryStore.sql
+++ /dev/null
@@ -1,38 +0,0 @@
1BEGIN TRANSACTION;
2
3CREATE TABLE inventoryfolders(
4 folderName varchar(255),
5 type integer,
6 version integer,
7 folderID varchar(255) primary key,
8 agentID varchar(255) not null default '00000000-0000-0000-0000-000000000000',
9 parentFolderID varchar(255) not null default '00000000-0000-0000-0000-000000000000');
10
11CREATE TABLE inventoryitems(
12 assetID varchar(255),
13 assetType integer,
14 inventoryName varchar(255),
15 inventoryDescription varchar(255),
16 inventoryNextPermissions integer,
17 inventoryCurrentPermissions integer,
18 invType integer,
19 creatorID varchar(255),
20 inventoryBasePermissions integer,
21 inventoryEveryOnePermissions integer,
22 salePrice integer default 99,
23 saleType integer default 0,
24 creationDate integer default 2000,
25 groupID varchar(255) default '00000000-0000-0000-0000-000000000000',
26 groupOwned integer default 0,
27 flags integer default 0,
28 inventoryID varchar(255) primary key,
29 parentFolderID varchar(255) not null default '00000000-0000-0000-0000-000000000000',
30 avatarID varchar(255) not null default '00000000-0000-0000-0000-000000000000',
31 inventoryGroupPermissions integer not null default 0);
32
33create index inventoryfolders_agentid on inventoryfolders(agentID);
34create index inventoryfolders_parentid on inventoryfolders(parentFolderID);
35create index inventoryitems_parentfolderid on inventoryitems(parentFolderID);
36create index inventoryitems_avatarid on inventoryitems(avatarID);
37
38COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/002_XInventoryStore.sql b/OpenSim/Data/SQLite/Resources/002_XInventoryStore.sql
deleted file mode 100644
index d38e2b7..0000000
--- a/OpenSim/Data/SQLite/Resources/002_XInventoryStore.sql
+++ /dev/null
@@ -1,8 +0,0 @@
1ATTACH 'inventoryStore.db' AS old;
2
3BEGIN TRANSACTION;
4
5INSERT INTO inventoryfolders (folderName, type, version, folderID, agentID, parentFolderID) SELECT `name` AS folderName, `type` AS type, `version` AS version, `UUID` AS folderID, `agentID` AS agentID, `parentID` AS parentFolderID from old.inventoryfolders;
6INSERT INTO inventoryitems (assetID, assetType, inventoryName, inventoryDescription, inventoryNextPermissions, inventoryCurrentPermissions, invType, creatorID, inventoryBasePermissions, inventoryEveryOnePermissions, salePrice, saleType, creationDate, groupID, groupOwned, flags, inventoryID, parentFolderID, avatarID, inventoryGroupPermissions) SELECT `assetID`, `assetType` AS assetType, `inventoryName` AS inventoryName, `inventoryDescription` AS inventoryDescription, `inventoryNextPermissions` AS inventoryNextPermissions, `inventoryCurrentPermissions` AS inventoryCurrentPermissions, `invType` AS invType, `creatorsID` AS creatorID, `inventoryBasePermissions` AS inventoryBasePermissions, `inventoryEveryOnePermissions` AS inventoryEveryOnePermissions, `salePrice` AS salePrice, `saleType` AS saleType, `creationDate` AS creationDate, `groupID` AS groupID, `groupOwned` AS groupOwned, `flags` AS flags, `UUID` AS inventoryID, `parentFolderID` AS parentFolderID, `avatarID` AS avatarID, `inventoryGroupPermissions` AS inventoryGroupPermissions FROM old.inventoryitems;
7
8COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/005_AssetStore.sql b/OpenSim/Data/SQLite/Resources/005_AssetStore.sql
deleted file mode 100644
index f06121a..0000000
--- a/OpenSim/Data/SQLite/Resources/005_AssetStore.sql
+++ /dev/null
@@ -1,5 +0,0 @@
1BEGIN;
2
3ALTER TABLE assets ADD COLUMN asset_flags INTEGER NOT NULL DEFAULT 0;
4
5COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/AssetStore.migrations b/OpenSim/Data/SQLite/Resources/AssetStore.migrations
index bc11e13..f20631c 100644
--- a/OpenSim/Data/SQLite/Resources/AssetStore.migrations
+++ b/OpenSim/Data/SQLite/Resources/AssetStore.migrations
@@ -55,7 +55,7 @@ CREATE TABLE assets(
55 Local, 55 Local,
56 Temporary, 56 Temporary,
57 asset_flags INTEGER NOT NULL DEFAULT 0, 57 asset_flags INTEGER NOT NULL DEFAULT 0,
58 CreatorID varchar(36) default '', 58 CreatorID varchar(128) default '',
59 Data); 59 Data);
60 60
61INSERT INTO assets(UUID,Name,Description,Type,Local,Temporary,Data) 61INSERT INTO assets(UUID,Name,Description,Type,Local,Temporary,Data)
@@ -64,3 +64,4 @@ DROP TABLE assets_backup;
64 64
65COMMIT; 65COMMIT;
66 66
67
diff --git a/OpenSim/Data/SQLite/Resources/XInventoryStore.migrations b/OpenSim/Data/SQLite/Resources/XInventoryStore.migrations
new file mode 100644
index 0000000..d5b3019
--- /dev/null
+++ b/OpenSim/Data/SQLite/Resources/XInventoryStore.migrations
@@ -0,0 +1,51 @@
1:VERSION 1
2
3BEGIN TRANSACTION;
4
5CREATE TABLE inventoryfolders(
6 folderName varchar(64),
7 type integer,
8 version integer,
9 folderID varchar(36) primary key,
10 agentID varchar(36) not null default '00000000-0000-0000-0000-000000000000',
11 parentFolderID varchar(36) not null default '00000000-0000-0000-0000-000000000000');
12
13CREATE TABLE inventoryitems(
14 assetID varchar(36),
15 assetType integer,
16 inventoryName varchar(64),
17 inventoryDescription varchar(128),
18 inventoryNextPermissions integer,
19 inventoryCurrentPermissions integer,
20 invType integer,
21 creatorID varchar(128),
22 inventoryBasePermissions integer,
23 inventoryEveryOnePermissions integer,
24 salePrice integer default 99,
25 saleType integer default 0,
26 creationDate integer default 2000,
27 groupID varchar(36) default '00000000-0000-0000-0000-000000000000',
28 groupOwned integer default 0,
29 flags integer default 0,
30 inventoryID varchar(36) primary key,
31 parentFolderID varchar(36) not null default '00000000-0000-0000-0000-000000000000',
32 avatarID varchar(36) not null default '00000000-0000-0000-0000-000000000000',
33 inventoryGroupPermissions integer not null default 0);
34
35create index inventoryfolders_agentid on inventoryfolders(agentID);
36create index inventoryfolders_parentid on inventoryfolders(parentFolderID);
37create index inventoryitems_parentfolderid on inventoryitems(parentFolderID);
38create index inventoryitems_avatarid on inventoryitems(avatarID);
39
40COMMIT;
41
42:VERSION 2
43
44ATTACH 'inventoryStore.db' AS old;
45
46BEGIN TRANSACTION;
47
48INSERT INTO inventoryfolders (folderName, type, version, folderID, agentID, parentFolderID) SELECT `name` AS folderName, `type` AS type, `version` AS version, `UUID` AS folderID, `agentID` AS agentID, `parentID` AS parentFolderID from old.inventoryfolders;
49INSERT INTO inventoryitems (assetID, assetType, inventoryName, inventoryDescription, inventoryNextPermissions, inventoryCurrentPermissions, invType, creatorID, inventoryBasePermissions, inventoryEveryOnePermissions, salePrice, saleType, creationDate, groupID, groupOwned, flags, inventoryID, parentFolderID, avatarID, inventoryGroupPermissions) SELECT `assetID`, `assetType` AS assetType, `inventoryName` AS inventoryName, `inventoryDescription` AS inventoryDescription, `inventoryNextPermissions` AS inventoryNextPermissions, `inventoryCurrentPermissions` AS inventoryCurrentPermissions, `invType` AS invType, `creatorsID` AS creatorID, `inventoryBasePermissions` AS inventoryBasePermissions, `inventoryEveryOnePermissions` AS inventoryEveryOnePermissions, `salePrice` AS salePrice, `saleType` AS saleType, `creationDate` AS creationDate, `groupID` AS groupID, `groupOwned` AS groupOwned, `flags` AS flags, `UUID` AS inventoryID, `parentFolderID` AS parentFolderID, `avatarID` AS avatarID, `inventoryGroupPermissions` AS inventoryGroupPermissions FROM old.inventoryitems;
50
51COMMIT; \ No newline at end of file