File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -788,7 +788,7 @@ private function upgradeModules() {
788
788
789
789
} else {
790
790
791
- $ msg = $ e ->getCode () . ': ' .$ e ->getMessage () . "\n" .
791
+ $ msg = $ e ->getPrevious ()-> getCode () . ': ' .$ e-> getPrevious () ->getMessage () . "\n" .
792
792
"Query: " . $ query . "\n" .
793
793
"Package: " . ($ module ->package ?? "legacy " ) . "\n" .
794
794
"Module: " . $ module ->name . "\n" .
Original file line number Diff line number Diff line change 220
220
$ updates ['202412031558 ' ][] = "create index addressbook_contact_lastContactAt_index
221
221
on addressbook_contact (lastContactAt); " ;
222
222
223
- $ updates ['202412031558 ' ][] = "update addressbook_contact c
223
+ $ updates ['202412031558 ' ][] = function () {
224
+ if (go ()->getDatabase ()->hasTable ("comments_comment " )) {
225
+ $ sql = "update addressbook_contact c
224
226
inner join comments_comment com on
225
227
com.entityId = c.id and com.entityTypeId = (select id from core_entity where name='Contact')
226
228
set c.lastContactAt = com.createdAt; " ;
227
229
230
+ echo "Running: " . $ sql . "\n" ;
231
+ go ()->getDbConnection ()->exec ($ sql );
232
+ }
233
+ };
234
+
228
235
229
236
$ updates ['202412031558 ' ][] = "alter table addressbook_contact
230
237
add actionAt date null; " ;
You can’t perform that action at this time.
0 commit comments