diff options
author | Diva Canto | 2016-02-21 09:00:59 -0800 |
---|---|---|
committer | Diva Canto | 2016-02-21 09:10:00 -0800 |
commit | ee24b2516545f57db5926aa69eb11b397fc599bb (patch) | |
tree | ead13634aee5bb6bcc5abee2773e213597ae764a /OpenSim/Data/SQLite/Resources/InventoryStore.migrations | |
parent | MySQL migrations: fix one last migration that had been left behind (diff) | |
download | opensim-SC_OLD-ee24b2516545f57db5926aa69eb11b397fc599bb.zip opensim-SC_OLD-ee24b2516545f57db5926aa69eb11b397fc599bb.tar.gz opensim-SC_OLD-ee24b2516545f57db5926aa69eb11b397fc599bb.tar.bz2 opensim-SC_OLD-ee24b2516545f57db5926aa69eb11b397fc599bb.tar.xz |
Flatten migrations for sqlite
Conflicts:
OpenSim/Data/SQLite/Resources/RegionStore.migrations
(Resolved)
Diffstat (limited to 'OpenSim/Data/SQLite/Resources/InventoryStore.migrations')
-rw-r--r-- | OpenSim/Data/SQLite/Resources/InventoryStore.migrations | 111 |
1 files changed, 29 insertions, 82 deletions
diff --git a/OpenSim/Data/SQLite/Resources/InventoryStore.migrations b/OpenSim/Data/SQLite/Resources/InventoryStore.migrations index 585ac49..2b48623 100644 --- a/OpenSim/Data/SQLite/Resources/InventoryStore.migrations +++ b/OpenSim/Data/SQLite/Resources/InventoryStore.migrations | |||
@@ -1,92 +1,39 @@ | |||
1 | :VERSION 1 | 1 | :VERSION 5 |
2 | 2 | ||
3 | BEGIN TRANSACTION; | 3 | BEGIN TRANSACTION; |
4 | 4 | ||
5 | CREATE TABLE inventoryfolders( | 5 | CREATE TABLE IF NOT EXISTS inventoryfolders( |
6 | UUID varchar(255) primary key, | 6 | folderName varchar(64), |
7 | name varchar(255), | ||
8 | agentID varchar(255), | ||
9 | parentID varchar(255), | ||
10 | type integer, | 7 | type integer, |
11 | version integer); | 8 | version integer, |
12 | 9 | folderID varchar(36) primary key, | |
13 | CREATE TABLE inventoryitems( | 10 | agentID varchar(36) not null default '00000000-0000-0000-0000-000000000000', |
14 | UUID varchar(255) primary key, | 11 | parentFolderID varchar(36) not null default '00000000-0000-0000-0000-000000000000'); |
15 | assetID varchar(255), | 12 | CREATE INDEX inventoryfolders_agentid on inventoryfolders(agentID); |
13 | CREATE INDEX inventoryfolders_parentid on inventoryfolders(parentFolderID); | ||
14 | |||
15 | CREATE TABLE IF NOT EXISTS inventoryitems( | ||
16 | assetID varchar(36), | ||
16 | assetType integer, | 17 | assetType integer, |
17 | invType integer, | 18 | inventoryName varchar(64), |
18 | parentFolderID varchar(255), | 19 | inventoryDescription varchar(128), |
19 | avatarID varchar(255), | ||
20 | creatorsID varchar(255), | ||
21 | inventoryName varchar(255), | ||
22 | inventoryDescription varchar(255), | ||
23 | inventoryNextPermissions integer, | 20 | inventoryNextPermissions integer, |
24 | inventoryCurrentPermissions integer, | 21 | inventoryCurrentPermissions integer, |
22 | invType integer, | ||
23 | creatorID varchar(128), | ||
25 | inventoryBasePermissions integer, | 24 | inventoryBasePermissions integer, |
26 | inventoryEveryOnePermissions integer, | 25 | inventoryEveryOnePermissions integer, |
27 | salePrice integer default 99, | 26 | salePrice integer default 99, |
28 | saleType integer default 0, | 27 | saleType integer default 0, |
29 | creationDate integer default 2000, | 28 | creationDate integer default 2000, |
30 | groupID varchar(255) default '00000000-0000-0000-0000-000000000000', | 29 | groupID varchar(36) default '00000000-0000-0000-0000-000000000000', |
31 | groupOwned integer default 0, | 30 | groupOwned integer default 0, |
32 | flags integer default 0); | 31 | flags integer default 0, |
33 | 32 | inventoryID varchar(36) primary key, | |
34 | COMMIT; | 33 | parentFolderID varchar(36) not null default '00000000-0000-0000-0000-000000000000', |
35 | 34 | avatarID varchar(36) not null default '00000000-0000-0000-0000-000000000000', | |
36 | :VERSION 2 | 35 | inventoryGroupPermissions integer not null default 0); |
37 | 36 | CREATE INDEX inventoryitems_parentfolderid on inventoryitems(parentFolderID); | |
38 | BEGIN TRANSACTION; | 37 | CREATE INDEX inventoryitems_avatarid on inventoryitems(avatarID); |
39 | |||
40 | create index inventoryfolders_agentid on inventoryfolders(agentid); | ||
41 | create index inventoryfolders_parentid on inventoryfolders(parentid); | ||
42 | create index inventoryitems_parentfolderid on inventoryitems(parentfolderid); | ||
43 | create index inventoryitems_avatarid on inventoryitems(avatarid); | ||
44 | |||
45 | COMMIT; | ||
46 | |||
47 | :VERSION 3 | ||
48 | |||
49 | BEGIN; | ||
50 | |||
51 | alter table inventoryitems add column inventoryGroupPermissions integer unsigned not null default 0; | ||
52 | |||
53 | COMMIT; | ||
54 | |||
55 | :VERSION 4 | ||
56 | |||
57 | BEGIN; | ||
58 | |||
59 | update inventoryitems | ||
60 | set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12) | ||
61 | where UUID not like '%-%'; | ||
62 | |||
63 | update inventoryitems | ||
64 | set assetID = substr(assetID, 1, 8) || "-" || substr(assetID, 9, 4) || "-" || substr(assetID, 13, 4) || "-" || substr(assetID, 17, 4) || "-" || substr(assetID, 21, 12) | ||
65 | where assetID not like '%-%'; | ||
66 | |||
67 | update inventoryitems | ||
68 | set parentFolderID = substr(parentFolderID, 1, 8) || "-" || substr(parentFolderID, 9, 4) || "-" || substr(parentFolderID, 13, 4) || "-" || substr(parentFolderID, 17, 4) || "-" || substr(parentFolderID, 21, 12) | ||
69 | where parentFolderID not like '%-%'; | ||
70 | |||
71 | update inventoryitems | ||
72 | set avatarID = substr(avatarID, 1, 8) || "-" || substr(avatarID, 9, 4) || "-" || substr(avatarID, 13, 4) || "-" || substr(avatarID, 17, 4) || "-" || substr(avatarID, 21, 12) | ||
73 | where avatarID not like '%-%'; | ||
74 | |||
75 | update inventoryitems | ||
76 | set creatorsID = substr(creatorsID, 1, 8) || "-" || substr(creatorsID, 9, 4) || "-" || substr(creatorsID, 13, 4) || "-" || substr(creatorsID, 17, 4) || "-" || substr(creatorsID, 21, 12) | ||
77 | where creatorsID not like '%-%'; | ||
78 | |||
79 | |||
80 | update inventoryfolders | ||
81 | set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12) | ||
82 | where UUID not like '%-%'; | ||
83 | |||
84 | update inventoryfolders | ||
85 | set agentID = substr(agentID, 1, 8) || "-" || substr(agentID, 9, 4) || "-" || substr(agentID, 13, 4) || "-" || substr(agentID, 17, 4) || "-" || substr(agentID, 21, 12) | ||
86 | where agentID not like '%-%'; | ||
87 | |||
88 | update inventoryfolders | ||
89 | set parentID = substr(parentID, 1, 8) || "-" || substr(parentID, 9, 4) || "-" || substr(parentID, 13, 4) || "-" || substr(parentID, 17, 4) || "-" || substr(parentID, 21, 12) | ||
90 | where parentID not like '%-%'; | ||
91 | 38 | ||
92 | COMMIT; | 39 | COMMIT; |