aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/PGSQL/Resources/UserProfiles.migrations
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/PGSQL/Resources/UserProfiles.migrations')
-rw-r--r--OpenSim/Data/PGSQL/Resources/UserProfiles.migrations75
1 files changed, 75 insertions, 0 deletions
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
82commit; 82commit;
83 83
84<<<<<<< HEAD
85:VERSION 3 # -------------------------------
86begin;
87CREATE TABLE usersettings (
88 "useruuid" char(36) NOT NULL,
89 "imviaemail" bytea NOT NULL,
90 "visible" bytea NOT NULL,
91 PRIMARY KEY ("useruuid")
92);
93commit;
94
95:VERSION 4
96
97BEGIN;
98
99-- Classifieds
100ALTER TABLE classifieds DROP CONSTRAINT classifiedspk;
101ALTER TABLE classifieds ALTER COLUMN classifieduuid SET DATA TYPE uuid using classifieduuid::uuid;
102ALTER TABLE classifieds ALTER COLUMN creatoruuid SET DATA TYPE uuid using creatoruuid::uuid;
103ALTER TABLE classifieds ALTER COLUMN parceluuid SET DATA TYPE uuid using parceluuid::uuid;
104ALTER TABLE classifieds ALTER COLUMN snapshotuuid SET DATA TYPE uuid using snapshotuuid::uuid;
105ALTER TABLE classifieds ADD CONSTRAINT classifiedspk PRIMARY KEY (classifieduuid);
106
107-- Notes
108ALTER TABLE usernotes DROP CONSTRAINT usernoteuk;
109ALTER TABLE usernotes ALTER COLUMN useruuid SET DATA TYPE uuid USING useruuid::uuid;
110ALTER TABLE usernotes ALTER COLUMN targetuuid SET DATA TYPE uuid USING targetuuid::uuid;
111ALTER TABLE usernotes ADD CONSTRAINT usernoteuk UNIQUE (useruuid,targetuuid);
112
113
114-- Userpicks
115ALTER TABLE userpicks DROP CONSTRAINT userpicks_pkey;
116ALTER TABLE userpicks ALTER COLUMN pickuuid SET DATA TYPE uuid USING pickuuid::uuid;
117ALTER TABLE userpicks ALTER COLUMN creatoruuid SET DATA TYPE uuid USING creatoruuid::uuid;
118ALTER TABLE userpicks ALTER COLUMN parceluuid SET DATA TYPE uuid USING parceluuid::uuid;
119ALTER TABLE userpicks ALTER COLUMN parceluuid SET DATA TYPE uuid USING parceluuid::uuid;
120ALTER TABLE userpicks ADD PRIMARY KEY (pickuuid);
121
122-- Userprofile
123ALTER TABLE userprofile DROP CONSTRAINT userprofile_pkey;
124ALTER TABLE userprofile ALTER COLUMN useruuid SET DATA TYPE uuid USING useruuid::uuid;
125ALTER TABLE userprofile ALTER COLUMN "profilePartner" SET DATA TYPE uuid USING "profilePartner"::uuid;
126-- Force column conversions
127ALTER TABLE userprofile ALTER COLUMN "profileAllowPublish" SET DATA TYPE boolean USING CASE WHEN false THEN false ELSE true END;
128ALTER TABLE userprofile ALTER COLUMN "profileMaturePublish" SET DATA TYPE boolean USING CASE WHEN false THEN false ELSE true END;
129ALTER TABLE userprofile ALTER COLUMN "profileImage" SET DATA TYPE uuid USING "profileImage"::uuid;
130ALTER TABLE userprofile ALTER COLUMN "profileFirstImage" SET DATA TYPE uuid USING "profileFirstImage"::uuid;
131ALTER TABLE userprofile ADD PRIMARY KEY (useruuid);
132
133-- Userdata
134ALTER TABLE userdata DROP CONSTRAINT userdata_pkey;
135ALTER TABLE userdata ALTER COLUMN "UserId" SET DATA TYPE uuid USING "UserId"::uuid;
136ALTER TABLE userdata ALTER COLUMN "UserId" SET DATA TYPE uuid USING "UserId"::uuid;
137ALTER TABLE userdata ADD PRIMARY KEY ("UserId","TagId");
138
139
140-- Usersettings
141ALTER TABLE usersettings DROP CONSTRAINT usersettings_pkey;
142ALTER TABLE usersettings ALTER COLUMN useruuid SET DATA TYPE uuid USING useruuid::uuid;
143ALTER TABLE usersettings ALTER COLUMN visible SET DATA TYPE boolean USING CASE WHEN false THEN false ELSE true END;
144ALTER TABLE usersettings ADD COLUMN email varchar(254) NOT NULL;
145ALTER TABLE usersettings ADD PRIMARY KEY (useruuid);
146
147COMMIT;
148
149
150:VERSION 5 # -------------------------------
151
152BEGIN;
153
154ALTER TABLE usersettings ALTER COLUMN imviaemail SET DATA TYPE boolean USING CASE WHEN false THEN false ELSE true END;
155
156COMMIT;
157=======
158>>>>>>> avn/ubitvar