aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/PGSQL/Resources/Presence.migrations
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/PGSQL/Resources/Presence.migrations')
-rwxr-xr-xOpenSim/Data/PGSQL/Resources/Presence.migrations42
1 files changed, 42 insertions, 0 deletions
diff --git a/OpenSim/Data/PGSQL/Resources/Presence.migrations b/OpenSim/Data/PGSQL/Resources/Presence.migrations
new file mode 100755
index 0000000..5184034
--- /dev/null
+++ b/OpenSim/Data/PGSQL/Resources/Presence.migrations
@@ -0,0 +1,42 @@
1:VERSION 1
2
3BEGIN TRANSACTION;
4
5CREATE TABLE Presence (
6"UserID" varchar(255) NOT NULL,
7"RegionID" uuid NOT NULL,
8"SessionID" uuid NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
9"SecureSessionID" uuid NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000'
10);
11
12
13COMMIT;
14
15:VERSION 2
16
17BEGIN TRANSACTION;
18
19CREATE UNIQUE INDEX SessionID ON Presence("SessionID");
20CREATE INDEX UserID ON Presence("UserID");
21
22ALTER TABLE Presence ADD "LastSeen" Timestamp;
23
24COMMIT;
25
26:VERSION 3 # --------------------------
27
28BEGIN;
29
30CREATE INDEX RegionID ON Presence("RegionID");
31
32COMMIT;
33
34:VERSION 4 # Making sure LastSeen is actually defined in the table as it most likely erred in the double version 2 migration above
35
36BEGIN;
37
38ALTER TABLE Presence
39DROP COLUMN IF EXISTS "LastSeen",
40ADD COLUMN "LastSeen" Timestamp;
41
42COMMIT; \ No newline at end of file