forked from liferay/liferay-portal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupdate-5.2.3-6.0.0.sql
282 lines (239 loc) · 7.2 KB
/
update-5.2.3-6.0.0.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
create table AssetCategory (
uuid_ VARCHAR(75) null,
categoryId LONG not null primary key,
groupId LONG,
companyId LONG,
userId LONG,
userName VARCHAR(75) null,
createDate DATE null,
modifiedDate DATE null,
parentCategoryId LONG,
leftCategoryId LONG,
rightCategoryId LONG,
name VARCHAR(75) null,
title STRING null,
vocabularyId LONG
);
create table AssetCategoryProperty (
categoryPropertyId LONG not null primary key,
companyId LONG,
userId LONG,
userName VARCHAR(75) null,
createDate DATE null,
modifiedDate DATE null,
categoryId LONG,
key_ VARCHAR(75) null,
value VARCHAR(75) null
);
create table AssetEntries_AssetCategories (
entryId LONG not null,
categoryId LONG not null,
primary key (entryId, categoryId)
);
create table AssetEntries_AssetTags (
entryId LONG not null,
tagId LONG not null,
primary key (entryId, tagId)
);
create table AssetEntry (
entryId LONG not null primary key,
groupId LONG,
companyId LONG,
userId LONG,
userName VARCHAR(75) null,
createDate DATE null,
modifiedDate DATE null,
classNameId LONG,
classPK LONG,
visible BOOLEAN,
startDate DATE null,
endDate DATE null,
publishDate DATE null,
expirationDate DATE null,
mimeType VARCHAR(75) null,
title VARCHAR(255) null,
description STRING null,
summary STRING null,
url STRING null,
height INTEGER,
width INTEGER,
priority DOUBLE,
viewCount INTEGER
);
create table AssetTag (
tagId LONG not null primary key,
groupId LONG,
companyId LONG,
userId LONG,
userName VARCHAR(75) null,
createDate DATE null,
modifiedDate DATE null,
name VARCHAR(75) null,
assetCount INTEGER
);
create table AssetTagProperty (
tagPropertyId LONG not null primary key,
companyId LONG,
userId LONG,
userName VARCHAR(75) null,
createDate DATE null,
modifiedDate DATE null,
tagId LONG,
key_ VARCHAR(75) null,
value VARCHAR(255) null
);
create table AssetTagStats (
tagStatsId LONG not null primary key,
tagId LONG,
classNameId LONG,
assetCount INTEGER
);
create table AssetVocabulary (
uuid_ VARCHAR(75) null,
vocabularyId LONG not null primary key,
groupId LONG,
companyId LONG,
userId LONG,
userName VARCHAR(75) null,
createDate DATE null,
modifiedDate DATE null,
name VARCHAR(75) null,
title STRING null,
description STRING null,
settings_ STRING null
);
alter table BlogsEntry add allowPingbacks BOOLEAN;
alter table BlogsEntry add status INTEGER;
alter table BlogsEntry add statusByUserId LONG;
alter table BlogsEntry add statusByUserName VARCHAR(75);
alter table BlogsEntry add statusDate DATE;
COMMIT_TRANSACTION;
update BlogsEntry set allowPingbacks = TRUE;
update BlogsEntry set status = 0 where draft = FALSE;
update BlogsEntry set status = 2 where draft = TRUE;
update BlogsEntry set statusByUserId = userId where draft = FALSE;
update BlogsEntry set statusByUserName = userName where draft = FALSE;
update BlogsEntry set statusDate = createDate where draft = FALSE;
alter table DLFileEntry add pendingVersion VARCHAR(75) null;
alter table DLFileShortcut add status INTEGER;
alter table DLFileShortcut add statusByUserId LONG;
alter table DLFileShortcut add statusByUserName VARCHAR(75);
alter table DLFileShortcut add statusDate DATE;
COMMIT_TRANSACTION;
update DLFileShortcut set status = 0;
update DLFileShortcut set statusByUserId = userId;
update DLFileShortcut set statusByUserName = CAST_TEXT(userId);
update DLFileShortcut set statusDate = createDate;
drop index IX_6C5E6512 on DLFileVersion;
alter table DLFileVersion add description STRING null;
alter table DLFileVersion add status INTEGER;
alter table DLFileVersion add statusByUserId LONG;
alter table DLFileVersion add statusByUserName VARCHAR(75);
alter table DLFileVersion add statusDate DATE;
COMMIT_TRANSACTION;
update DLFileVersion set status = 0;
update DLFileVersion set statusByUserId = userId;
update DLFileVersion set statusByUserName = CAST_TEXT(userId);
update DLFileVersion set statusDate = createDate;
alter table JournalArticle add status INTEGER;
alter table JournalArticle add statusByUserId LONG;
alter table JournalArticle add statusByUserName VARCHAR(75);
alter table JournalArticle add statusDate DATE;
COMMIT_TRANSACTION;
update JournalArticle set status = 0 where approved = TRUE;
update JournalArticle set status = 2 where approved = FALSE;
update JournalArticle set statusByUserId = approvedByUserId;
update JournalArticle set statusByUserName = approvedByUserName;
update JournalArticle set statusDate = approvedDate where expired = FALSE;
update JournalArticle set statusDate = expirationDate where expired = TRUE;
alter table Layout add layoutPrototypeId LONG;
create table LayoutPrototype (
layoutPrototypeId LONG not null primary key,
companyId LONG,
name STRING null,
description STRING null,
settings_ STRING null,
active_ BOOLEAN
);
alter table LayoutSet add layoutSetPrototypeId LONG;
create table LayoutSetPrototype (
layoutSetPrototypeId LONG not null primary key,
companyId LONG,
name STRING null,
description STRING null,
settings_ STRING null,
active_ BOOLEAN
);
create table Lock_ (
uuid_ VARCHAR(75) null,
lockId LONG not null primary key,
companyId LONG,
userId LONG,
userName VARCHAR(75) null,
createDate DATE null,
className VARCHAR(75) null,
key_ VARCHAR(200) null,
owner VARCHAR(75) null,
inheritable BOOLEAN,
expirationDate DATE null
);
alter table MBMessage add allowPingbacks BOOLEAN;
alter table MBMessage add status INTEGER;
alter table MBMessage add statusByUserId LONG;
alter table MBMessage add statusByUserName VARCHAR(75);
alter table MBMessage add statusDate DATE;
COMMIT_TRANSACTION;
update MBMessage set allowPingbacks = TRUE;
update MBMessage set status = 0;
update MBMessage set statusByUserId = userId;
update MBMessage set statusByUserName = CAST_TEXT(userId);
update MBMessage set statusDate = createDate;
alter table MBThread add status INTEGER;
alter table MBThread add statusByUserId LONG;
alter table MBThread add statusByUserName VARCHAR(75);
alter table MBThread add statusDate DATE;
COMMIT_TRANSACTION;
update MBThread set status = 0;
alter table Release_ add servletContextName VARCHAR(75);
COMMIT_TRANSACTION;
update Release_ set servletContextName = 'portal';
alter table ShoppingItem add groupId LONG;
create table UserGroupGroupRole (
userGroupId LONG not null,
groupId LONG not null,
roleId LONG not null,
primary key (userGroupId, groupId, roleId)
);
alter table WikiPage add status INTEGER;
alter table WikiPage add statusByUserId LONG;
alter table WikiPage add statusByUserName VARCHAR(75);
alter table WikiPage add statusDate DATE;
COMMIT_TRANSACTION;
update WikiPage set status = 0;
update WikiPage set statusByUserId = userId;
update WikiPage set statusByUserName = CAST_TEXT(userId);
update WikiPage set statusDate = createDate;
create table WorkflowDefinitionLink (
workflowDefinitionLinkId LONG not null primary key,
groupId LONG,
companyId LONG,
userId LONG,
userName VARCHAR(75) null,
createDate DATE null,
modifiedDate DATE null,
classNameId LONG,
workflowDefinitionName VARCHAR(75) null,
workflowDefinitionVersion INTEGER
);
create table WorkflowInstanceLink (
workflowInstanceLinkId LONG not null primary key,
groupId LONG,
companyId LONG,
userId LONG,
userName VARCHAR(75) null,
createDate DATE null,
modifiedDate DATE null,
classNameId LONG,
classPK LONG,
workflowInstanceId LONG
);