diff options
author | AlexRa | 2010-05-06 22:44:57 +0300 |
---|---|---|
committer | AlexRa | 2010-05-16 17:04:39 +0300 |
commit | 1ad12851d076094d6fad3ebe604b4cae378eaef3 (patch) | |
tree | 9aa6706c2b890f63f19a5f3c1e05099a2edba000 /OpenSim/Data/SQLite/Resources/InventoryStore.migrations | |
parent | Converted MySQL migration history to the new format (diff) | |
download | opensim-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 'OpenSim/Data/SQLite/Resources/InventoryStore.migrations')
-rw-r--r-- | OpenSim/Data/SQLite/Resources/InventoryStore.migrations | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/OpenSim/Data/SQLite/Resources/InventoryStore.migrations b/OpenSim/Data/SQLite/Resources/InventoryStore.migrations new file mode 100644 index 0000000..585ac49 --- /dev/null +++ b/OpenSim/Data/SQLite/Resources/InventoryStore.migrations | |||
@@ -0,0 +1,92 @@ | |||
1 | :VERSION 1 | ||
2 | |||
3 | BEGIN TRANSACTION; | ||
4 | |||
5 | CREATE 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 | |||
13 | CREATE 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 | |||
34 | COMMIT; | ||
35 | |||
36 | :VERSION 2 | ||
37 | |||
38 | BEGIN TRANSACTION; | ||
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 | |||
92 | COMMIT; | ||