diff options
author | Fernando Oliveira | 2013-10-12 16:33:45 -0500 |
---|---|---|
committer | fernando | 2013-10-12 16:33:45 -0500 |
commit | ff8a76825841533bdc5d534b6f58b2ab964ea6c6 (patch) | |
tree | 4ddde40916db04c1506486c9e7ba88b37f53e23e /OpenSim/Data/PGSQL/Resources/AssetStore.migrations | |
parent | * pushing test (diff) | |
download | opensim-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 'OpenSim/Data/PGSQL/Resources/AssetStore.migrations')
-rw-r--r-- | OpenSim/Data/PGSQL/Resources/AssetStore.migrations | 94 |
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 | |||
3 | CREATE 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 | |||
15 | BEGIN TRANSACTION; | ||
16 | |||
17 | CREATE 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 | |||
28 | INSERT 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 | |||
32 | DROP TABLE assets; | ||
33 | |||
34 | Alter table Tmp_assets | ||
35 | rename to assets; | ||
36 | |||
37 | ALTER TABLE assets ADD PRIMARY KEY ("id"); | ||
38 | |||
39 | COMMIT; | ||
40 | |||
41 | |||
42 | :VERSION 3 | ||
43 | |||
44 | BEGIN TRANSACTION; | ||
45 | |||
46 | ALTER TABLE assets add "create_time" integer default 0; | ||
47 | ALTER TABLE assets add "access_time" integer default 0; | ||
48 | |||
49 | COMMIT; | ||
50 | |||
51 | |||
52 | :VERSION 4 | ||
53 | |||
54 | BEGIN TRANSACTION; | ||
55 | |||
56 | CREATE 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 | |||
70 | INSERT 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 | |||
74 | DROP TABLE assets; | ||
75 | |||
76 | Alter table Tmp_assets | ||
77 | rename to assets; | ||
78 | |||
79 | ALTER TABLE assets ADD PRIMARY KEY ("id"); | ||
80 | |||
81 | COMMIT; | ||
82 | |||
83 | |||
84 | :VERSION 5 | ||
85 | |||
86 | DELETE FROM assets WHERE "id" = 'dc4b9f0b-d008-45c6-96a4-01dd947ac621'; | ||
87 | |||
88 | :VERSION 6 | ||
89 | |||
90 | ALTER TABLE assets ADD "asset_flags" INTEGER NOT NULL DEFAULT 0; | ||
91 | |||
92 | :VERSION 7 | ||
93 | |||
94 | alter table assets add "creatorid" varchar(36) not null default ''; | ||