aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/PGSQL/Resources/UserAccount.migrations
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/PGSQL/Resources/UserAccount.migrations51
1 files changed, 51 insertions, 0 deletions
diff --git a/OpenSim/Data/PGSQL/Resources/UserAccount.migrations b/OpenSim/Data/PGSQL/Resources/UserAccount.migrations
new file mode 100644
index 0000000..c785463
--- /dev/null
+++ b/OpenSim/Data/PGSQL/Resources/UserAccount.migrations
@@ -0,0 +1,51 @@
1:VERSION 1
2
3CREATE TABLE UserAccounts (
4 "PrincipalID" uuid NOT NULL Primary key,
5 "ScopeID" uuid NOT NULL,
6 "FirstName" varchar(64) NOT NULL,
7 "LastName" varchar(64) NOT NULL,
8 "Email" varchar(64) NULL,
9 "ServiceURLs" text NULL,
10 "Created" int default NULL
11);
12
13
14:VERSION 2
15
16BEGIN TRANSACTION;
17
18INSERT INTO UserAccounts ("PrincipalID", "ScopeID", "FirstName", "LastName", "Email", "ServiceURLs", "Created")
19SELECT UUID AS "PrincipalID", '00000000-0000-0000-0000-000000000000' AS "ScopeID",
20username AS "FirstName",
21lastname AS "LastName",
22email as "Email", (
23'AssetServerURI=' +
24userAssetURI + ' InventoryServerURI=' + userInventoryURI + ' GatewayURI= HomeURI=') AS "ServiceURLs",
25created as "Created" FROM users;
26
27COMMIT;
28
29:VERSION 3
30
31BEGIN TRANSACTION;
32
33CREATE UNIQUE INDEX "PrincipalID" ON UserAccounts("PrincipalID");
34CREATE INDEX "Email" ON UserAccounts("Email");
35CREATE INDEX "FirstName" ON UserAccounts("FirstName");
36CREATE INDEX "LastName" ON UserAccounts("LastName");
37CREATE INDEX Name ON UserAccounts("FirstName","LastName");
38
39COMMIT;
40
41:VERSION 4
42
43BEGIN TRANSACTION;
44
45ALTER TABLE UserAccounts ADD "UserLevel" integer NOT NULL DEFAULT 0;
46ALTER TABLE UserAccounts ADD "UserFlags" integer NOT NULL DEFAULT 0;
47ALTER TABLE UserAccounts ADD "UserTitle" varchar(64) NOT NULL DEFAULT '';
48
49COMMIT;
50
51