diff options
Diffstat (limited to 'OpenSim/Data/PGSQL/Resources')
-rw-r--r-- | OpenSim/Data/PGSQL/Resources/AssetStore.migrations | 5 | ||||
-rw-r--r-- | OpenSim/Data/PGSQL/Resources/IM_Store.migrations | 19 | ||||
-rwxr-xr-x[-rw-r--r--] | OpenSim/Data/PGSQL/Resources/Presence.migrations | 18 | ||||
-rw-r--r-- | OpenSim/Data/PGSQL/Resources/RegionStore.migrations | 8 | ||||
-rw-r--r-- | OpenSim/Data/PGSQL/Resources/UserProfiles.migrations | 75 | ||||
-rw-r--r-- | OpenSim/Data/PGSQL/Resources/XAssetStore.migrations | 53 | ||||
-rw-r--r-- | OpenSim/Data/PGSQL/Resources/os_groups_Store.migrations | 117 |
7 files changed, 292 insertions, 3 deletions
diff --git a/OpenSim/Data/PGSQL/Resources/AssetStore.migrations b/OpenSim/Data/PGSQL/Resources/AssetStore.migrations index b6db585..7a858b4 100644 --- a/OpenSim/Data/PGSQL/Resources/AssetStore.migrations +++ b/OpenSim/Data/PGSQL/Resources/AssetStore.migrations | |||
@@ -92,3 +92,8 @@ ALTER TABLE assets ADD "asset_flags" INTEGER NOT NULL DEFAULT 0; | |||
92 | :VERSION 7 | 92 | :VERSION 7 |
93 | 93 | ||
94 | alter table assets add "creatorid" varchar(36) not null default ''; | 94 | alter table assets add "creatorid" varchar(36) not null default ''; |
95 | |||
96 | :VERSION 8 | ||
97 | |||
98 | BEGIN TRANSACTION; | ||
99 | COMMIT; | ||
diff --git a/OpenSim/Data/PGSQL/Resources/IM_Store.migrations b/OpenSim/Data/PGSQL/Resources/IM_Store.migrations index 70dc011..eb97824 100644 --- a/OpenSim/Data/PGSQL/Resources/IM_Store.migrations +++ b/OpenSim/Data/PGSQL/Resources/IM_Store.migrations | |||
@@ -24,3 +24,22 @@ DELETE FROM `migrations` WHERE name='diva_im_Store'; | |||
24 | */ | 24 | */ |
25 | 25 | ||
26 | COMMIT; | 26 | COMMIT; |
27 | |||
28 | :VERSION 3 # -------------------------- | ||
29 | |||
30 | BEGIN; | ||
31 | |||
32 | -- dropping the table here as there most likely is only one record in the table at the time of migration | ||
33 | |||
34 | DROP TABLE IF EXISTS "public"."im_offline"; | ||
35 | CREATE TABLE "public"."im_offline" ( | ||
36 | "ID" serial, | ||
37 | "PrincipalID" uuid NOT NULL, | ||
38 | "Message" text NOT NULL COLLATE "default", | ||
39 | "TMStamp" timestamp(6) NOT NULL DEFAULT clock_timestamp(), | ||
40 | "FromID" uuid NOT NULL | ||
41 | ) | ||
42 | WITH (OIDS=FALSE); | ||
43 | ALTER TABLE "public"."im_offline" ADD PRIMARY KEY ("ID","PrincipalID","FromID") NOT DEFERRABLE INITIALLY IMMEDIATE; | ||
44 | |||
45 | COMMIT; \ No newline at end of file | ||
diff --git a/OpenSim/Data/PGSQL/Resources/Presence.migrations b/OpenSim/Data/PGSQL/Resources/Presence.migrations index 684faa2..5184034 100644..100755 --- a/OpenSim/Data/PGSQL/Resources/Presence.migrations +++ b/OpenSim/Data/PGSQL/Resources/Presence.migrations | |||
@@ -19,12 +19,24 @@ BEGIN TRANSACTION; | |||
19 | CREATE UNIQUE INDEX SessionID ON Presence("SessionID"); | 19 | CREATE UNIQUE INDEX SessionID ON Presence("SessionID"); |
20 | CREATE INDEX UserID ON Presence("UserID"); | 20 | CREATE INDEX UserID ON Presence("UserID"); |
21 | 21 | ||
22 | ALTER TABLE Presence ADD "LastSeen" Timestamp; | ||
23 | |||
22 | COMMIT; | 24 | COMMIT; |
23 | 25 | ||
24 | :VERSION 2 | 26 | :VERSION 3 # -------------------------- |
25 | 27 | ||
26 | BEGIN TRANSACTION; | 28 | BEGIN; |
27 | 29 | ||
28 | ALTER TABLE Presence ADD "LastSeen" Timestamp; | 30 | CREATE INDEX RegionID ON Presence("RegionID"); |
29 | 31 | ||
30 | COMMIT; | 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 | ||
diff --git a/OpenSim/Data/PGSQL/Resources/RegionStore.migrations b/OpenSim/Data/PGSQL/Resources/RegionStore.migrations index 1e33027..1284ce0 100644 --- a/OpenSim/Data/PGSQL/Resources/RegionStore.migrations +++ b/OpenSim/Data/PGSQL/Resources/RegionStore.migrations | |||
@@ -1152,3 +1152,11 @@ ALTER TABLE regionwindlight ALTER draw_classic_clouds TYPE bool USING CASE WHEN | |||
1152 | ALTER TABLE regionwindlight ALTER COLUMN draw_classic_clouds SET DEFAULT FALSE; | 1152 | ALTER TABLE regionwindlight ALTER COLUMN draw_classic_clouds SET DEFAULT FALSE; |
1153 | 1153 | ||
1154 | COMMIT; | 1154 | COMMIT; |
1155 | |||
1156 | VERSION 41 #-- Change Landlags to bigint | ||
1157 | |||
1158 | BEGIN TRANSACTION; | ||
1159 | |||
1160 | ALTER TABLE land ALTER "LandFlags" TYPE bigint; | ||
1161 | |||
1162 | COMMIT; | ||
diff --git a/OpenSim/Data/PGSQL/Resources/UserProfiles.migrations b/OpenSim/Data/PGSQL/Resources/UserProfiles.migrations index f23c870..a67107a 100644 --- a/OpenSim/Data/PGSQL/Resources/UserProfiles.migrations +++ b/OpenSim/Data/PGSQL/Resources/UserProfiles.migrations | |||
@@ -81,3 +81,78 @@ CREATE TABLE userdata ( | |||
81 | 81 | ||
82 | commit; | 82 | commit; |
83 | 83 | ||
84 | <<<<<<< HEAD | ||
85 | :VERSION 3 # ------------------------------- | ||
86 | begin; | ||
87 | CREATE TABLE usersettings ( | ||
88 | "useruuid" char(36) NOT NULL, | ||
89 | "imviaemail" bytea NOT NULL, | ||
90 | "visible" bytea NOT NULL, | ||
91 | PRIMARY KEY ("useruuid") | ||
92 | ); | ||
93 | commit; | ||
94 | |||
95 | :VERSION 4 | ||
96 | |||
97 | BEGIN; | ||
98 | |||
99 | -- Classifieds | ||
100 | ALTER TABLE classifieds DROP CONSTRAINT classifiedspk; | ||
101 | ALTER TABLE classifieds ALTER COLUMN classifieduuid SET DATA TYPE uuid using classifieduuid::uuid; | ||
102 | ALTER TABLE classifieds ALTER COLUMN creatoruuid SET DATA TYPE uuid using creatoruuid::uuid; | ||
103 | ALTER TABLE classifieds ALTER COLUMN parceluuid SET DATA TYPE uuid using parceluuid::uuid; | ||
104 | ALTER TABLE classifieds ALTER COLUMN snapshotuuid SET DATA TYPE uuid using snapshotuuid::uuid; | ||
105 | ALTER TABLE classifieds ADD CONSTRAINT classifiedspk PRIMARY KEY (classifieduuid); | ||
106 | |||
107 | -- Notes | ||
108 | ALTER TABLE usernotes DROP CONSTRAINT usernoteuk; | ||
109 | ALTER TABLE usernotes ALTER COLUMN useruuid SET DATA TYPE uuid USING useruuid::uuid; | ||
110 | ALTER TABLE usernotes ALTER COLUMN targetuuid SET DATA TYPE uuid USING targetuuid::uuid; | ||
111 | ALTER TABLE usernotes ADD CONSTRAINT usernoteuk UNIQUE (useruuid,targetuuid); | ||
112 | |||
113 | |||
114 | -- Userpicks | ||
115 | ALTER TABLE userpicks DROP CONSTRAINT userpicks_pkey; | ||
116 | ALTER TABLE userpicks ALTER COLUMN pickuuid SET DATA TYPE uuid USING pickuuid::uuid; | ||
117 | ALTER TABLE userpicks ALTER COLUMN creatoruuid SET DATA TYPE uuid USING creatoruuid::uuid; | ||
118 | ALTER TABLE userpicks ALTER COLUMN parceluuid SET DATA TYPE uuid USING parceluuid::uuid; | ||
119 | ALTER TABLE userpicks ALTER COLUMN parceluuid SET DATA TYPE uuid USING parceluuid::uuid; | ||
120 | ALTER TABLE userpicks ADD PRIMARY KEY (pickuuid); | ||
121 | |||
122 | -- Userprofile | ||
123 | ALTER TABLE userprofile DROP CONSTRAINT userprofile_pkey; | ||
124 | ALTER TABLE userprofile ALTER COLUMN useruuid SET DATA TYPE uuid USING useruuid::uuid; | ||
125 | ALTER TABLE userprofile ALTER COLUMN "profilePartner" SET DATA TYPE uuid USING "profilePartner"::uuid; | ||
126 | -- Force column conversions | ||
127 | ALTER TABLE userprofile ALTER COLUMN "profileAllowPublish" SET DATA TYPE boolean USING CASE WHEN false THEN false ELSE true END; | ||
128 | ALTER TABLE userprofile ALTER COLUMN "profileMaturePublish" SET DATA TYPE boolean USING CASE WHEN false THEN false ELSE true END; | ||
129 | ALTER TABLE userprofile ALTER COLUMN "profileImage" SET DATA TYPE uuid USING "profileImage"::uuid; | ||
130 | ALTER TABLE userprofile ALTER COLUMN "profileFirstImage" SET DATA TYPE uuid USING "profileFirstImage"::uuid; | ||
131 | ALTER TABLE userprofile ADD PRIMARY KEY (useruuid); | ||
132 | |||
133 | -- Userdata | ||
134 | ALTER TABLE userdata DROP CONSTRAINT userdata_pkey; | ||
135 | ALTER TABLE userdata ALTER COLUMN "UserId" SET DATA TYPE uuid USING "UserId"::uuid; | ||
136 | ALTER TABLE userdata ALTER COLUMN "UserId" SET DATA TYPE uuid USING "UserId"::uuid; | ||
137 | ALTER TABLE userdata ADD PRIMARY KEY ("UserId","TagId"); | ||
138 | |||
139 | |||
140 | -- Usersettings | ||
141 | ALTER TABLE usersettings DROP CONSTRAINT usersettings_pkey; | ||
142 | ALTER TABLE usersettings ALTER COLUMN useruuid SET DATA TYPE uuid USING useruuid::uuid; | ||
143 | ALTER TABLE usersettings ALTER COLUMN visible SET DATA TYPE boolean USING CASE WHEN false THEN false ELSE true END; | ||
144 | ALTER TABLE usersettings ADD COLUMN email varchar(254) NOT NULL; | ||
145 | ALTER TABLE usersettings ADD PRIMARY KEY (useruuid); | ||
146 | |||
147 | COMMIT; | ||
148 | |||
149 | |||
150 | :VERSION 5 # ------------------------------- | ||
151 | |||
152 | BEGIN; | ||
153 | |||
154 | ALTER TABLE usersettings ALTER COLUMN imviaemail SET DATA TYPE boolean USING CASE WHEN false THEN false ELSE true END; | ||
155 | |||
156 | COMMIT; | ||
157 | ======= | ||
158 | >>>>>>> avn/ubitvar | ||
diff --git a/OpenSim/Data/PGSQL/Resources/XAssetStore.migrations b/OpenSim/Data/PGSQL/Resources/XAssetStore.migrations index 325ed0d..df9d821 100644 --- a/OpenSim/Data/PGSQL/Resources/XAssetStore.migrations +++ b/OpenSim/Data/PGSQL/Resources/XAssetStore.migrations | |||
@@ -25,3 +25,56 @@ CREATE TABLE XAssetsData ( | |||
25 | ); | 25 | ); |
26 | 26 | ||
27 | COMMIT; | 27 | COMMIT; |
28 | |||
29 | |||
30 | :VERSION 2 | ||
31 | |||
32 | BEGIN; | ||
33 | |||
34 | ALTER TABLE xassetsmeta ALTER COLUMN "Local" SET DATA TYPE boolean USING CASE WHEN '0' THEN FALSE ELSE TRUE END; | ||
35 | ALTER TABLE xassetsmeta ALTER COLUMN "Temporary" SET DATA TYPE boolean USING CASE WHEN '0' THEN FALSE ELSE TRUE END; | ||
36 | ALTER TABLE xassetsmeta ALTER COLUMN "Hash" SET DATA TYPE char(66); | ||
37 | ALTER TABLE xassetsdata ALTER COLUMN "Hash" SET DATA TYPE char(66); | ||
38 | |||
39 | COMMIT; | ||
40 | |||
41 | :VERSION 3 | ||
42 | |||
43 | BEGIN; | ||
44 | |||
45 | ALTER TABLE xassetsmeta RENAME COLUMN "ID" TO id; | ||
46 | ALTER TABLE xassetsmeta RENAME COLUMN "Hash" TO hash; | ||
47 | ALTER TABLE xassetsmeta RENAME COLUMN "Name" TO name; | ||
48 | ALTER TABLE xassetsmeta RENAME COLUMN "Description" TO description; | ||
49 | ALTER TABLE xassetsmeta RENAME COLUMN "Local" to local; | ||
50 | ALTER TABLE xassetsmeta RENAME COLUMN "Temporary" TO temporary; | ||
51 | ALTER TABLE xassetsmeta RENAME COLUMN "CreateTime" TO create_time; | ||
52 | ALTER TABLE xassetsmeta RENAME COLUMN "AccessTime" TO access_time; | ||
53 | ALTER TABLE xassetsmeta RENAME COLUMN "AssetFlags" TO asset_flags; | ||
54 | ALTER TABLE xassetsmeta RENAME COLUMN "CreatorID" TO creatorid; | ||
55 | ALTER TABLE xassetsmeta DROP CONSTRAINT xassetsmeta_pkey; | ||
56 | ALTER TABLE xassetsmeta ADD PRIMARY KEY (id); | ||
57 | |||
58 | |||
59 | ALTER TABLE xassetsdata RENAME COLUMN "Hash" TO hash; | ||
60 | ALTER TABLE xassetsdata RENAME COLUMN "Data" TO data; | ||
61 | ALTER TABLE xassetsdata DROP CONSTRAINT xassetsdata_pkey; | ||
62 | ALTER TABLE xassetsdata ADD PRIMARY KEY (hash); | ||
63 | |||
64 | COMMIT; | ||
65 | |||
66 | |||
67 | :VERSION 4 | ||
68 | |||
69 | BEGIN; | ||
70 | |||
71 | ALTER TABLE xassetsmeta ALTER COLUMN id SET DATA TYPE uuid USING id::uuid; | ||
72 | ALTER TABLE xassetsmeta ALTER COLUMN hash SET DATA TYPE bytea USING hash::bytea; | ||
73 | ALTER TABLE xassetsdata ALTER COLUMN hash SET DATA TYPE bytea USING hash::bytea; | ||
74 | |||
75 | COMMIT; | ||
76 | |||
77 | :VERSION 5 | ||
78 | |||
79 | BEGIN; | ||
80 | COMMIT; | ||
diff --git a/OpenSim/Data/PGSQL/Resources/os_groups_Store.migrations b/OpenSim/Data/PGSQL/Resources/os_groups_Store.migrations index 4573f71..74b07c3 100644 --- a/OpenSim/Data/PGSQL/Resources/os_groups_Store.migrations +++ b/OpenSim/Data/PGSQL/Resources/os_groups_Store.migrations | |||
@@ -92,3 +92,120 @@ BEGIN; | |||
92 | 92 | ||
93 | 93 | ||
94 | COMMIT; | 94 | COMMIT; |
95 | |||
96 | |||
97 | |||
98 | :VERSION 3 | ||
99 | |||
100 | BEGIN; | ||
101 | |||
102 | -- Not a pretty way to do this, but it did not work as-is | ||
103 | -- and nothing was found about converting between existing data | ||
104 | -- and the new type. | ||
105 | -- Since there should be nothing to preserve ... | ||
106 | |||
107 | DROP TABLE IF EXISTS os_groups_groups CASCADE; | ||
108 | |||
109 | CREATE TABLE os_groups_groups ( | ||
110 | "GroupID" uuid PRIMARY KEY NOT NULL, | ||
111 | "Location" varchar(255) NOT NULL DEFAULT '', | ||
112 | "Name" varchar(255) NOT NULL DEFAULT '', | ||
113 | "Charter" text NOT NULL, | ||
114 | "InsigniaID" uuid NOT NULL, | ||
115 | "FounderID" uuid NOT NULL, | ||
116 | "MembershipFee" integer NOT NULL DEFAULT '0', | ||
117 | "OpenEnrollment" varchar(255) NOT NULL DEFAULT '', | ||
118 | "ShowInList" integer NOT NULL DEFAULT '0', | ||
119 | "AllowPublish" integer NOT NULL DEFAULT '0', | ||
120 | "MaturePublish" integer NOT NULL DEFAULT '0', | ||
121 | "OwnerRoleID" uuid NOT NULL | ||
122 | ); | ||
123 | |||
124 | |||
125 | DROP TABLE IF EXISTS os_groups_membership; | ||
126 | |||
127 | CREATE TABLE os_groups_membership ( | ||
128 | "GroupID"uuid NOT NULL, | ||
129 | "PrincipalID" VARCHAR(255) NOT NULL DEFAULT '', | ||
130 | "SelectedRoleID" uuid NOT NULL, | ||
131 | "Contribution" integer NOT NULL DEFAULT '0', | ||
132 | "ListInProfile" integer NOT NULL DEFAULT '1', | ||
133 | "AcceptNotices" integer NOT NULL DEFAULT '1', | ||
134 | "AccessToken" uuid NOT NULL, | ||
135 | constraint os_groupmemberpk PRIMARY KEY ("GroupID", "PrincipalID") | ||
136 | ); | ||
137 | |||
138 | |||
139 | |||
140 | DROP TABLE IF EXISTS os_groups_roles; | ||
141 | |||
142 | CREATE TABLE os_groups_roles ( | ||
143 | "GroupID" uuid NOT NULL, | ||
144 | "RoleID" uuid NOT NULL, | ||
145 | "Name" varchar(255) NOT NULL DEFAULT '', | ||
146 | "Description" varchar(255) NOT NULL DEFAULT '', | ||
147 | "Title" varchar(255) NOT NULL DEFAULT '', | ||
148 | "Powers" varchar(36) NOT NULL DEFAULT '', | ||
149 | constraint os_grouprolepk PRIMARY KEY ("GroupID","RoleID") | ||
150 | ); | ||
151 | |||
152 | |||
153 | DROP TABLE IF EXISTS os_groups_rolemembership; | ||
154 | |||
155 | CREATE TABLE os_groups_rolemembership ( | ||
156 | "GroupID" uuid NOT NULL, | ||
157 | "RoleID" uuid NOT NULL, | ||
158 | "PrincipalID" VARCHAR(255) NOT NULL DEFAULT '', | ||
159 | constraint os_grouprolememberpk PRIMARY KEY ("GroupID","RoleID","PrincipalID") | ||
160 | ); | ||
161 | |||
162 | |||
163 | DROP TABLE IF EXISTS os_groups_invites; | ||
164 | |||
165 | CREATE TABLE os_groups_invites ( | ||
166 | "InviteID" uuid NOT NULL, | ||
167 | "GroupID" uuid NOT NULL, | ||
168 | "RoleID" uuid NOT NULL, | ||
169 | "PrincipalID" VARCHAR(255) NOT NULL DEFAULT '', | ||
170 | "TMStamp" timestamp NOT NULL DEFAULT now(), | ||
171 | constraint os_groupinvitespk PRIMARY KEY ("InviteID") | ||
172 | ); | ||
173 | |||
174 | |||
175 | DROP TABLE IF EXISTS os_groups_notices; | ||
176 | |||
177 | CREATE TABLE os_groups_notices ( | ||
178 | "GroupID" uuid NOT NULL, | ||
179 | "NoticeID" uuid NOT NULL, | ||
180 | "TMStamp" integer NOT NULL DEFAULT '0', | ||
181 | "FromName" varchar(255) NOT NULL DEFAULT '', | ||
182 | "Subject" varchar(255) NOT NULL DEFAULT '', | ||
183 | "Message" text NOT NULL, | ||
184 | "HasAttachment" integer NOT NULL DEFAULT '0', | ||
185 | "AttachmentType" integer NOT NULL DEFAULT '0', | ||
186 | "AttachmentName" varchar(128) NOT NULL DEFAULT '', | ||
187 | "AttachmentItemID" uuid NOT NULL, | ||
188 | "AttachmentOwnerID" varchar(255) NOT NULL DEFAULT '', | ||
189 | constraint os_groupsnoticespk PRIMARY KEY ("NoticeID") | ||
190 | ); | ||
191 | |||
192 | |||
193 | DROP TABLE IF EXISTS os_groups_principals; | ||
194 | |||
195 | CREATE TABLE os_groups_principals ( | ||
196 | "PrincipalID" VARCHAR(255) NOT NULL DEFAULT '', | ||
197 | "ActiveGroupID" uuid NOT NULL, | ||
198 | constraint os_groupprincpk PRIMARY KEY ("PrincipalID") | ||
199 | ); | ||
200 | |||
201 | COMMIT; | ||
202 | |||
203 | :VERSION 4 | ||
204 | |||
205 | BEGIN; | ||
206 | |||
207 | ALTER TABLE IF EXISTS os_groups_notices | ||
208 | ALTER COLUMN "AttachmentItemID" SET DEFAULT '00000000-0000-0000-0000-000000000000' | ||
209 | ; | ||
210 | |||
211 | COMMIT; | ||