diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Data/MySQL/Resources/AssetStore.migrations | 76 |
1 files changed, 8 insertions, 68 deletions
diff --git a/OpenSim/Data/MySQL/Resources/AssetStore.migrations b/OpenSim/Data/MySQL/Resources/AssetStore.migrations index 661d825..820799d 100644 --- a/OpenSim/Data/MySQL/Resources/AssetStore.migrations +++ b/OpenSim/Data/MySQL/Resources/AssetStore.migrations | |||
@@ -1,81 +1,21 @@ | |||
1 | # ----------------- | 1 | # ----------------- |
2 | :VERSION 1 | 2 | :VERSION 10 |
3 | 3 | ||
4 | BEGIN; | 4 | BEGIN; |
5 | 5 | ||
6 | CREATE TABLE `assets` ( | 6 | CREATE TABLE IF NOT EXISTS `assets` ( |
7 | `id` binary(16) NOT NULL, | ||
8 | `name` varchar(64) NOT NULL, | 7 | `name` varchar(64) NOT NULL, |
9 | `description` varchar(64) NOT NULL, | 8 | `description` varchar(64) NOT NULL, |
10 | `assetType` tinyint(4) NOT NULL, | 9 | `assetType` tinyint(4) NOT NULL, |
11 | `invType` tinyint(4) NOT NULL, | ||
12 | `local` tinyint(1) NOT NULL, | 10 | `local` tinyint(1) NOT NULL, |
13 | `temporary` tinyint(1) NOT NULL, | 11 | `temporary` tinyint(1) NOT NULL, |
14 | `data` longblob NOT NULL, | 12 | `data` longblob NOT NULL, |
13 | `id` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', | ||
14 | `create_time` int(11) DEFAULT '0', | ||
15 | `access_time` int(11) DEFAULT '0', | ||
16 | `asset_flags` int(11) NOT NULL DEFAULT '0', | ||
17 | `CreatorID` varchar(128) NOT NULL DEFAULT '', | ||
15 | PRIMARY KEY (`id`) | 18 | PRIMARY KEY (`id`) |
16 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1'; | 19 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
17 | 20 | ||
18 | COMMIT; | 21 | COMMIT; |
19 | |||
20 | # ----------------- | ||
21 | :VERSION 2 | ||
22 | |||
23 | BEGIN; | ||
24 | |||
25 | ALTER TABLE assets change id oldid binary(16); | ||
26 | ALTER TABLE assets add id varchar(36) not null default ''; | ||
27 | UPDATE assets set id = concat(substr(hex(oldid),1,8),"-",substr(hex(oldid),9,4),"-",substr(hex(oldid),13,4),"-",substr(hex(oldid),17,4),"-",substr(hex(oldid),21,12)); | ||
28 | ALTER TABLE assets drop oldid; | ||
29 | ALTER TABLE assets add constraint primary key(id); | ||
30 | |||
31 | COMMIT; | ||
32 | |||
33 | # ----------------- | ||
34 | :VERSION 3 | ||
35 | |||
36 | BEGIN; | ||
37 | |||
38 | ALTER TABLE assets change id oldid varchar(36); | ||
39 | ALTER TABLE assets add id char(36) not null default '00000000-0000-0000-0000-000000000000'; | ||
40 | UPDATE assets set id = oldid; | ||
41 | ALTER TABLE assets drop oldid; | ||
42 | ALTER TABLE assets add constraint primary key(id); | ||
43 | |||
44 | COMMIT; | ||
45 | |||
46 | # ----------------- | ||
47 | :VERSION 4 | ||
48 | |||
49 | BEGIN; | ||
50 | |||
51 | ALTER TABLE assets drop InvType; | ||
52 | |||
53 | COMMIT; | ||
54 | |||
55 | # ----------------- | ||
56 | :VERSION 5 | ||
57 | |||
58 | BEGIN; | ||
59 | |||
60 | ALTER TABLE assets add create_time integer default 0; | ||
61 | ALTER TABLE assets add access_time integer default 0; | ||
62 | |||
63 | COMMIT; | ||
64 | |||
65 | # ----------------- | ||
66 | :VERSION 6 | ||
67 | |||
68 | DELETE FROM assets WHERE id = 'dc4b9f0b-d008-45c6-96a4-01dd947ac621' | ||
69 | |||
70 | :VERSION 7 | ||
71 | |||
72 | ALTER TABLE assets ADD COLUMN asset_flags INTEGER NOT NULL DEFAULT 0; | ||
73 | |||
74 | :VERSION 8 | ||
75 | |||
76 | ALTER TABLE assets ADD COLUMN CreatorID varchar(128) NOT NULL DEFAULT ''; | ||
77 | |||
78 | :VERSION 9 | ||
79 | |||
80 | BEGIN; | ||
81 | COMMIT; | ||