aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/PGSQL/Resources/GridUserStore.migrations
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/PGSQL/Resources/GridUserStore.migrations')
-rw-r--r--OpenSim/Data/PGSQL/Resources/GridUserStore.migrations60
1 files changed, 60 insertions, 0 deletions
diff --git a/OpenSim/Data/PGSQL/Resources/GridUserStore.migrations b/OpenSim/Data/PGSQL/Resources/GridUserStore.migrations
new file mode 100644
index 0000000..d37c4f6d
--- /dev/null
+++ b/OpenSim/Data/PGSQL/Resources/GridUserStore.migrations
@@ -0,0 +1,60 @@
1:VERSION 1 # --------------------------
2
3BEGIN TRANSACTION;
4
5CREATE TABLE GridUser (
6 "UserID" VARCHAR(255) NOT NULL Primary Key,
7 "HomeRegionID" CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
8 "HomePosition" CHAR(64) NOT NULL DEFAULT '<0,0,0>',
9 "HomeLookAt" CHAR(64) NOT NULL DEFAULT '<0,0,0>',
10 "LastRegionID" CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
11 "LastPosition" CHAR(64) NOT NULL DEFAULT '<0,0,0>',
12 "LastLookAt" CHAR(64) NOT NULL DEFAULT '<0,0,0>',
13 "Online" CHAR(5) NOT NULL DEFAULT 'false',
14 "Login" CHAR(16) NOT NULL DEFAULT '0',
15 "Logout" CHAR(16) NOT NULL DEFAULT '0'
16) ;
17
18COMMIT;
19
20:VERSION 2 # --------------------------
21
22BEGIN TRANSACTION;
23
24CREATE TABLE GridUser_tmp (
25 "UserID" VARCHAR(255) NOT NULL PRIMARY KEY,
26 "HomeRegionID" uuid NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
27 "HomePosition" CHAR(64) NOT NULL DEFAULT '<0,0,0>',
28 "HomeLookAt" CHAR(64) NOT NULL DEFAULT '<0,0,0>',
29 "LastRegionID" uuid NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
30 "LastPosition" CHAR(64) NOT NULL DEFAULT '<0,0,0>',
31 "LastLookAt" CHAR(64) NOT NULL DEFAULT '<0,0,0>',
32 "Online" CHAR(5) NOT NULL DEFAULT 'false',
33 "Login" CHAR(16) NOT NULL DEFAULT '0',
34 "Logout" CHAR(16) NOT NULL DEFAULT '0'
35 );
36
37COMMIT;
38
39
40INSERT INTO GridUser_tmp ("UserID"
41 ,"HomeRegionID"
42 ,"HomePosition"
43 ,"HomeLookAt"
44 ,"LastRegionID"
45 ,"LastPosition"
46 ,"LastLookAt"
47 ,"Online"
48 ,"Login"
49 ,"Logout")
50 SELECT "UserID", cast("HomeRegionID" as uuid), "HomePosition" ,"HomeLookAt" , cast("LastRegionID" as uuid),
51 "LastPosition"
52 ,"LastLookAt"
53 ,"Online"
54 ,"Login"
55 ,"Logout" FROM GridUser;
56
57DROP TABLE GridUser;
58
59alter table GridUser_tmp rename to GridUser;
60