diff options
author | AlexRa | 2010-05-06 22:44:57 +0300 |
---|---|---|
committer | AlexRa | 2010-05-18 22:16:10 +0300 |
commit | 6e7b3950d70b0dbe3b765d596adc534a6ca3a2a9 (patch) | |
tree | d9a809d417ed531fbde0f041156b449d4030708a /OpenSim/Data/SQLite/Resources/AssetStore.migrations | |
parent | Converted MySQL migration history to the new format (diff) | |
download | opensim-SC_OLD-6e7b3950d70b0dbe3b765d596adc534a6ca3a2a9.zip opensim-SC_OLD-6e7b3950d70b0dbe3b765d596adc534a6ca3a2a9.tar.gz opensim-SC_OLD-6e7b3950d70b0dbe3b765d596adc534a6ca3a2a9.tar.bz2 opensim-SC_OLD-6e7b3950d70b0dbe3b765d596adc534a6ca3a2a9.tar.xz |
Migrations for SQLite converted to new format
Diffstat (limited to 'OpenSim/Data/SQLite/Resources/AssetStore.migrations')
-rw-r--r-- | OpenSim/Data/SQLite/Resources/AssetStore.migrations | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/OpenSim/Data/SQLite/Resources/AssetStore.migrations b/OpenSim/Data/SQLite/Resources/AssetStore.migrations new file mode 100644 index 0000000..fb72b91 --- /dev/null +++ b/OpenSim/Data/SQLite/Resources/AssetStore.migrations | |||
@@ -0,0 +1,42 @@ | |||
1 | :VERSION 1 | ||
2 | |||
3 | BEGIN TRANSACTION; | ||
4 | CREATE TABLE assets( | ||
5 | UUID varchar(255) primary key, | ||
6 | Name varchar(255), | ||
7 | Description varchar(255), | ||
8 | Type integer, | ||
9 | InvType integer, | ||
10 | Local integer, | ||
11 | Temporary integer, | ||
12 | Data blob); | ||
13 | |||
14 | COMMIT; | ||
15 | |||
16 | :VERSION 2 | ||
17 | |||
18 | BEGIN TRANSACTION; | ||
19 | |||
20 | CREATE TEMPORARY TABLE assets_backup(UUID,Name,Description,Type,Local,Temporary,Data); | ||
21 | INSERT INTO assets_backup SELECT UUID,Name,Description,Type,Local,Temporary,Data FROM assets; | ||
22 | DROP TABLE assets; | ||
23 | CREATE TABLE assets(UUID,Name,Description,Type,Local,Temporary,Data); | ||
24 | INSERT INTO assets SELECT UUID,Name,Description,Type,Local,Temporary,Data FROM assets_backup; | ||
25 | DROP TABLE assets_backup; | ||
26 | |||
27 | COMMIT; | ||
28 | |||
29 | :VERSION 3 | ||
30 | |||
31 | DELETE FROM assets WHERE UUID = 'dc4b9f0bd00845c696a401dd947ac621' | ||
32 | |||
33 | :VERSION 4 | ||
34 | |||
35 | BEGIN; | ||
36 | |||
37 | update assets | ||
38 | set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12) | ||
39 | where UUID not like '%-%'; | ||
40 | |||
41 | COMMIT; | ||
42 | |||