aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/SQLite/Resources/AssetStore.migrations
blob: f20631cc144cfbfc28424692630e134d3ff951b0 (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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
: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;

:VERSION 5

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 NOT NULL PRIMARY KEY,
	Name,
	Description,
	Type,
	Local,
	Temporary,
	asset_flags INTEGER NOT NULL DEFAULT 0,
	CreatorID varchar(128) default '',
	Data);
	
INSERT INTO assets(UUID,Name,Description,Type,Local,Temporary,Data) 
SELECT UUID,Name,Description,Type,Local,Temporary,Data FROM assets_backup;
DROP TABLE assets_backup;

COMMIT;