aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/PGSQL/Resources/AssetStore.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/AssetStore.migrations
parent* pushing test (diff)
downloadopensim-SC_OLD-ff8a76825841533bdc5d534b6f58b2ab964ea6c6.zip
opensim-SC_OLD-ff8a76825841533bdc5d534b6f58b2ab964ea6c6.tar.gz
opensim-SC_OLD-ff8a76825841533bdc5d534b6f58b2ab964ea6c6.tar.bz2
opensim-SC_OLD-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 'OpenSim/Data/PGSQL/Resources/AssetStore.migrations')
-rw-r--r--OpenSim/Data/PGSQL/Resources/AssetStore.migrations94
1 files changed, 94 insertions, 0 deletions
diff --git a/OpenSim/Data/PGSQL/Resources/AssetStore.migrations b/OpenSim/Data/PGSQL/Resources/AssetStore.migrations
new file mode 100644
index 0000000..b6db585
--- /dev/null
+++ b/OpenSim/Data/PGSQL/Resources/AssetStore.migrations
@@ -0,0 +1,94 @@
1:VERSION 1
2
3CREATE TABLE assets (
4 "id" varchar(36) NOT NULL PRIMARY KEY,
5 "name" varchar(64) NOT NULL,
6 "description" varchar(64) NOT NULL,
7 "assetType" smallint NOT NULL,
8 "local" smallint NOT NULL,
9 "temporary" smallint NOT NULL,
10 "data" bytea NOT NULL
11) ;
12
13:VERSION 2
14
15BEGIN TRANSACTION;
16
17CREATE TABLE Tmp_assets
18 (
19 "id" varchar(36) NOT NULL,
20 "name" varchar(64) NOT NULL,
21 "description" varchar(64) NOT NULL,
22 "assetType" smallint NOT NULL,
23 "local" boolean NOT NULL,
24 "temporary" boolean NOT NULL,
25 "data" bytea NOT NULL
26 ) ;
27
28INSERT INTO Tmp_assets ("id", "name", "description", "assetType", "local", "temporary", "data")
29 SELECT "id", "name", "description", "assetType", case when "local" = 1 then true else false end, case when "temporary" = 1 then true else false end, "data"
30 FROM assets ;
31
32DROP TABLE assets;
33
34Alter table Tmp_assets
35 rename to assets;
36
37ALTER TABLE assets ADD PRIMARY KEY ("id");
38
39COMMIT;
40
41
42:VERSION 3
43
44BEGIN TRANSACTION;
45
46ALTER TABLE assets add "create_time" integer default 0;
47ALTER TABLE assets add "access_time" integer default 0;
48
49COMMIT;
50
51
52:VERSION 4
53
54BEGIN TRANSACTION;
55
56CREATE TABLE Tmp_assets
57 (
58 "id" uuid NOT NULL,
59 "name" varchar(64) NOT NULL,
60 "description" varchar(64) NOT NULL,
61 "assetType" smallint NOT NULL,
62 "local" boolean NOT NULL,
63 "temporary" boolean NOT NULL,
64 "data" bytea NOT NULL,
65 "create_time" int NULL,
66 "access_time" int NULL
67 ) ;
68
69
70INSERT INTO Tmp_assets ("id", "name", "description", "assetType", "local", "temporary", "data", "create_time", "access_time")
71 SELECT cast("id" as uuid), "name", "description", "assetType", "local", "temporary", "data", "create_time", "access_time"
72 FROM assets ;
73
74DROP TABLE assets;
75
76Alter table Tmp_assets
77 rename to assets;
78
79 ALTER TABLE assets ADD PRIMARY KEY ("id");
80
81COMMIT;
82
83
84:VERSION 5
85
86DELETE FROM assets WHERE "id" = 'dc4b9f0b-d008-45c6-96a4-01dd947ac621';
87
88:VERSION 6
89
90ALTER TABLE assets ADD "asset_flags" INTEGER NOT NULL DEFAULT 0;
91
92:VERSION 7
93
94alter table assets add "creatorid" varchar(36) not null default '';