File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 112025-07-23 Francois Suter (Idéative) <typo3@ideative.ch>
22
33 * Consider only live records in mapping utility, resolves #384
4+ * Prevent upgrade wizard from crashing when cruser_id field has been removed, resolves #381
45
562025-06-07 Francois Suter (Idéative) <typo3@ideative.ch>
67
Original file line number Diff line number Diff line change @@ -85,11 +85,28 @@ public function executeUpdate(): bool
8585 return true ;
8686 }
8787
88+ /**
89+ * Ensure that the cruser_id field is still there (the user might have already dropped it)
90+ */
8891 public function updateNecessary (): bool
8992 {
90- // It's hard to check whether an update is really necessary or not, and since the implications
91- // are minimal, let's just always do it
92- return true ;
93+ $ connection = GeneralUtility::makeInstance (ConnectionPool::class)->getConnectionForTable (self ::TABLE_NAME );
94+ try {
95+ $ result = $ connection ->executeQuery (
96+ sprintf (
97+ 'SHOW COLUMNS FROM %s; ' ,
98+ self ::TABLE_NAME
99+ )
100+ );
101+ while ($ row = $ result ->fetchAssociative ()) {
102+ if ($ row ['Field ' ] === 'cruser_id ' ) {
103+ return true ;
104+ }
105+ }
106+ } catch (\Throwable $ e ) {
107+ return false ;
108+ }
109+ return false ;
93110 }
94111
95112 public function getPrerequisites (): array
You can’t perform that action at this time.
0 commit comments