aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/SQLite/Resources/AssetStore.migrations
blob: fb72b91af9cd1c97f1ce2c7408d4b7ff9f1b74bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
:VERSION 1

BEGIN TRANSACTION;
CREATE TABLE assets(
       UUID varchar(255) primary key,
       Name varchar(255),
       Description varchar(255),
       Type integer,
       InvType integer,
       Local integer,
       Temporary integer,
       Data blob);

COMMIT;

:VERSION 2

BEGIN TRANSACTION;

CREATE TEMPORARY TABLE assets_backup(UUID,Name,Description,Type,Local,Temporary,Data);
INSERT INTO assets_backup SELECT UUID,Name,Description,Type,Local,Temporary,Data FROM assets;
DROP TABLE assets;
CREATE TABLE assets(UUID,Name,Description,Type,Local,Temporary,Data);
INSERT INTO assets SELECT UUID,Name,Description,Type,Local,Temporary,Data FROM assets_backup;
DROP TABLE assets_backup;

COMMIT;

:VERSION 3

DELETE FROM assets WHERE UUID = 'dc4b9f0bd00845c696a401dd947ac621'

:VERSION 4

BEGIN;

update assets
  set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12)
  where UUID not like '%-%';

COMMIT;