diff options
Diffstat (limited to 'OpenSim/Data/MySQL/Resources/AssetStore.migrations')
-rw-r--r-- | OpenSim/Data/MySQL/Resources/AssetStore.migrations | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/OpenSim/Data/MySQL/Resources/AssetStore.migrations b/OpenSim/Data/MySQL/Resources/AssetStore.migrations new file mode 100644 index 0000000..3fd58b7 --- /dev/null +++ b/OpenSim/Data/MySQL/Resources/AssetStore.migrations | |||
@@ -0,0 +1,77 @@ | |||
1 | # ----------------- | ||
2 | :VERSION 1 | ||
3 | |||
4 | BEGIN; | ||
5 | |||
6 | CREATE TABLE `assets` ( | ||
7 | `id` binary(16) NOT NULL, | ||
8 | `name` varchar(64) NOT NULL, | ||
9 | `description` varchar(64) NOT NULL, | ||
10 | `assetType` tinyint(4) NOT NULL, | ||
11 | `invType` tinyint(4) NOT NULL, | ||
12 | `local` tinyint(1) NOT NULL, | ||
13 | `temporary` tinyint(1) NOT NULL, | ||
14 | `data` longblob NOT NULL, | ||
15 | PRIMARY KEY (`id`) | ||
16 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1'; | ||
17 | |||
18 | 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 CreatorID varchar(36) not null default '' | ||
77 | |||