File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -128,8 +128,10 @@ protected function dropTables(): void
128
128
WHERE table_schema = database() '
129
129
);
130
130
131
+ $ rows = (array )$ statement ->fetchAll (PDO ::FETCH_ASSOC );
132
+
131
133
$ sql = [];
132
- while ($ row = $ statement -> fetch ( PDO :: FETCH_ASSOC ) ) {
134
+ foreach ($ rows as $ row ) {
133
135
$ sql [] = sprintf ('DROP TABLE `%s`; ' , $ row ['TABLE_NAME ' ]);
134
136
}
135
137
@@ -202,8 +204,10 @@ protected function truncateTables(): void
202
204
AND update_time IS NOT NULL '
203
205
);
204
206
207
+ $ rows = (array )$ statement ->fetchAll (PDO ::FETCH_ASSOC );
208
+
205
209
$ sql = [];
206
- while ($ row = $ statement -> fetch ( PDO :: FETCH_ASSOC ) ) {
210
+ foreach ($ rows as $ row ) {
207
211
$ sql [] = sprintf ('TRUNCATE TABLE `%s`; ' , $ row ['TABLE_NAME ' ]);
208
212
}
209
213
You can’t perform that action at this time.
0 commit comments