aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL/Resources/AssetStore.migrations
diff options
context:
space:
mode:
authorAlexRa2010-05-01 17:43:10 +0300
committerAlexRa2010-05-16 17:04:13 +0300
commitee713cb253c1ef2d09de235964e02e7621649dd8 (patch)
treeb85373e71ddc2ece69726ea60c0f636ccc302c72 /OpenSim/Data/MySQL/Resources/AssetStore.migrations
parentAdded MySqlMigrations.cs (supports stored proc/funcs) (diff)
downloadopensim-SC_OLD-ee713cb253c1ef2d09de235964e02e7621649dd8.zip
opensim-SC_OLD-ee713cb253c1ef2d09de235964e02e7621649dd8.tar.gz
opensim-SC_OLD-ee713cb253c1ef2d09de235964e02e7621649dd8.tar.bz2
opensim-SC_OLD-ee713cb253c1ef2d09de235964e02e7621649dd8.tar.xz
Converted MySQL migration history to the new format
Replaced all NNN_StoreName.sql migration resources with a more readable, single-file-per-store
Diffstat (limited to 'OpenSim/Data/MySQL/Resources/AssetStore.migrations')
-rw-r--r--OpenSim/Data/MySQL/Resources/AssetStore.migrations69
1 files changed, 69 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..b9595f0
--- /dev/null
+++ b/OpenSim/Data/MySQL/Resources/AssetStore.migrations
@@ -0,0 +1,69 @@
1# -----------------
2:VERSION 1
3
4BEGIN;
5
6CREATE 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
18COMMIT;
19
20# -----------------
21:VERSION 2
22
23BEGIN;
24
25ALTER TABLE assets change id oldid binary(16);
26ALTER TABLE assets add id varchar(36) not null default '';
27UPDATE 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));
28ALTER TABLE assets drop oldid;
29ALTER TABLE assets add constraint primary key(id);
30
31COMMIT;
32
33# -----------------
34:VERSION 3
35
36BEGIN;
37
38ALTER TABLE assets change id oldid varchar(36);
39ALTER TABLE assets add id char(36) not null default '00000000-0000-0000-0000-000000000000';
40UPDATE assets set id = oldid;
41ALTER TABLE assets drop oldid;
42ALTER TABLE assets add constraint primary key(id);
43
44COMMIT;
45
46# -----------------
47:VERSION 4
48
49BEGIN;
50
51ALTER TABLE assets drop InvType;
52
53COMMIT;
54
55# -----------------
56:VERSION 5
57
58BEGIN;
59
60ALTER TABLE assets add create_time integer default 0;
61ALTER TABLE assets add access_time integer default 0;
62
63COMMIT;
64
65# -----------------
66:VERSION 6
67
68DELETE FROM assets WHERE id = 'dc4b9f0b-d008-45c6-96a4-01dd947ac621'
69