diff options
Diffstat (limited to 'OpenSim/Data/PGSQL/Resources/Presence.migrations')
-rwxr-xr-x | OpenSim/Data/PGSQL/Resources/Presence.migrations | 42 |
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 | |||
3 | BEGIN TRANSACTION; | ||
4 | |||
5 | CREATE 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 | |||
13 | COMMIT; | ||
14 | |||
15 | :VERSION 2 | ||
16 | |||
17 | BEGIN TRANSACTION; | ||
18 | |||
19 | CREATE UNIQUE INDEX SessionID ON Presence("SessionID"); | ||
20 | CREATE INDEX UserID ON Presence("UserID"); | ||
21 | |||
22 | ALTER TABLE Presence ADD "LastSeen" Timestamp; | ||
23 | |||
24 | COMMIT; | ||
25 | |||
26 | :VERSION 3 # -------------------------- | ||
27 | |||
28 | BEGIN; | ||
29 | |||
30 | CREATE INDEX RegionID ON Presence("RegionID"); | ||
31 | |||
32 | COMMIT; | ||
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 | |||
36 | BEGIN; | ||
37 | |||
38 | ALTER TABLE Presence | ||
39 | DROP COLUMN IF EXISTS "LastSeen", | ||
40 | ADD COLUMN "LastSeen" Timestamp; | ||
41 | |||
42 | COMMIT; \ No newline at end of file | ||