aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/PGSQL/Resources/GridUserStore.migrations
diff options
context:
space:
mode:
authorFernando Oliveira2013-10-12 16:33:45 -0500
committerfernando2013-10-12 16:33:45 -0500
commitff8a76825841533bdc5d534b6f58b2ab964ea6c6 (patch)
tree4ddde40916db04c1506486c9e7ba88b37f53e23e /OpenSim/Data/PGSQL/Resources/GridUserStore.migrations
parent* pushing test (diff)
downloadopensim-SC-ff8a76825841533bdc5d534b6f58b2ab964ea6c6.zip
opensim-SC-ff8a76825841533bdc5d534b6f58b2ab964ea6c6.tar.gz
opensim-SC-ff8a76825841533bdc5d534b6f58b2ab964ea6c6.tar.bz2
opensim-SC-ff8a76825841533bdc5d534b6f58b2ab964ea6c6.tar.xz
Fernando Oliveira's Postgress SQL Server Data Connector as a single commit.
* Added PostGreSQL support * Added MySQL/MySQLXGroupData.cs * PostgreSQL data access implementation * PostgreSQL dll binarie and RegionStore.migrations * Migrations Scripts from MSSQL to POSTGRES * Postgres SQL Type fixes * Postgres SQL Connection string * Data type issues * more fixes * tests and +tests * UUID x string - FIGHT! * Fixed PG types to internal csharp types * More data type fix (PostgreSQL fields are case sensitive) :( * more field case sensitive fixes * changed the migration files to be case sensitive for fields. * fixed fields case * finished converting, now search for hidden bugs. * some more fixes * bool type fixed * more case fixes; * creatorID case fixed * case fields fixed * fixed default now() for TMStamp fields with don't allow nulls. * fix case sensitve for Region name and Estate name * fixed case for names for search * fix class name Error * Bug fixed on select and migrations * Un-Reverting my change due to Postgres issue with the ILIKE function * Fixed some issued for Diva Distro * Fixes for integration with Diva Distro * Added System.Core to prebuild.xml for PG project * Configured to make DIff for Push to OpenSim Project * Diffs only to PostgreSQL mods.
Diffstat (limited to '')
-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