aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/PGSQL/Resources/Avatar.migrations
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/PGSQL/Resources/Avatar.migrations59
1 files changed, 59 insertions, 0 deletions
diff --git a/OpenSim/Data/PGSQL/Resources/Avatar.migrations b/OpenSim/Data/PGSQL/Resources/Avatar.migrations
new file mode 100644
index 0000000..160086d
--- /dev/null
+++ b/OpenSim/Data/PGSQL/Resources/Avatar.migrations
@@ -0,0 +1,59 @@
1:VERSION 1
2
3BEGIN TRANSACTION;
4
5CREATE TABLE Avatars (
6"PrincipalID" uuid NOT NULL PRIMARY KEY,
7"Name" varchar(32) NOT NULL,
8"Value" varchar(255) NOT NULL DEFAULT ''
9);
10
11
12COMMIT;
13
14:VERSION 2
15
16BEGIN TRANSACTION;
17
18CREATE TABLE Tmp_Avatars
19 (
20 "PrincipalID" uuid NOT NULL,
21 "Name" varchar(32) NOT NULL,
22 "Value" text NOT NULL DEFAULT ''
23 ) ;
24
25 INSERT INTO Tmp_Avatars ("PrincipalID", "Name", "Value")
26 SELECT "PrincipalID", cast("Name" as text), "Value"
27 FROM Avatars ;
28
29DROP TABLE Avatars;
30
31Alter table Tmp_Avatars
32 rename to Avatars;
33
34COMMIT;
35
36:VERSION 3
37
38BEGIN TRANSACTION;
39
40CREATE TABLE Tmp_Avatars
41 (
42 "PrincipalID" uuid NOT NULL,
43 "Name" varchar(32) NOT NULL,
44 "Value" text NOT NULL DEFAULT ''
45);
46
47ALTER TABLE Tmp_Avatars ADD PRIMARY KEY ("PrincipalID", "Name");
48
49
50INSERT INTO Tmp_Avatars ("PrincipalID", "Name", "Value")
51 SELECT "PrincipalID", "Name", cast("Value" as text) FROM Avatars ;
52
53DROP TABLE Avatars;
54
55Alter table Tmp_Avatars
56 rename to Avatars;
57
58COMMIT;
59