aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/PGSQL/Resources
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/PGSQL/Resources')
-rw-r--r--OpenSim/Data/PGSQL/Resources/XAssetStore.migrations45
1 files changed, 45 insertions, 0 deletions
diff --git a/OpenSim/Data/PGSQL/Resources/XAssetStore.migrations b/OpenSim/Data/PGSQL/Resources/XAssetStore.migrations
index 1513cc3..8fb3656 100644
--- a/OpenSim/Data/PGSQL/Resources/XAssetStore.migrations
+++ b/OpenSim/Data/PGSQL/Resources/XAssetStore.migrations
@@ -36,4 +36,49 @@ ALTER TABLE xassetsmeta ALTER COLUMN "Temporary" SET DATA TYPE boolean USING CAS
36ALTER TABLE xassetsmeta ALTER COLUMN "Hash" SET DATA TYPE char(66); 36ALTER TABLE xassetsmeta ALTER COLUMN "Hash" SET DATA TYPE char(66);
37ALTER TABLE xassetsdata ALTER COLUMN "Hash" SET DATA TYPE char(66); 37ALTER TABLE xassetsdata ALTER COLUMN "Hash" SET DATA TYPE char(66);
38 38
39COMMIT;
40
41:VERSION 3
42
43BEGIN;
44
45ALTER TABLE xassetsmeta RENAME COLUMN "ID" TO id;
46ALTER TABLE xassetsmeta RENAME COLUMN "Hash" TO hash;
47ALTER TABLE xassetsmeta RENAME COLUMN "Name" TO name;
48ALTER TABLE xassetsmeta RENAME COLUMN "Description" TO description;
49ALTER TABLE xassetsmeta RENAME COLUMN "Local" to local;
50ALTER TABLE xassetsmeta RENAME COLUMN "Temporary" TO temporary;
51ALTER TABLE xassetsmeta RENAME COLUMN "CreateTime" TO create_time;
52ALTER TABLE xassetsmeta RENAME COLUMN "AccessTime" TO access_time;
53ALTER TABLE xassetsmeta RENAME COLUMN "AssetFlags" TO asset_flags;
54ALTER TABLE xassetsmeta RENAME COLUMN "CreatorID" TO creatorid;
55ALTER TABLE xassetsmeta DROP CONSTRAINT xassetsmeta_pkey;
56ALTER TABLE xassetsmeta ADD PRIMARY KEY (id);
57
58
59ALTER TABLE xassetsdata RENAME COLUMN "Hash" TO hash;
60ALTER TABLE xassetsdata RENAME COLUMN "Data" TO data;
61ALTER TABLE xassetsdata DROP CONSTRAINT xassetsdata_pkey;
62ALTER TABLE xassetsdata ADD PRIMARY KEY (hash);
63
64COMMIT;
65
66
67:VERSION 4
68
69BEGIN;
70
71;; This is a harsh way of migrating these columns to
72;; a different data type, but it didn't work otherwise
73;; and we have a strict warning when using the module
74;; so here we go ...
75
76ALTER TABLE xassetsmeta DROP COLUMN hash;
77ALTER TABLE xassetsmeta ADD COLUMN hash bytea NOT NULL;
78
79ALTER TABLE xassetsdata DROP CONSTRAINT xassetsdata_pkey;
80ALTER TABLE xassetsdata DROP COLUMN hash;
81ALTER TABLE xassetsdata ADD COLUMN hash bytea NOT NULL;
82ALTER TABLE xassetsdata ADD PRIMARY KEY (hash);
83
39COMMIT; \ No newline at end of file 84COMMIT; \ No newline at end of file