File tree 2 files changed +16
-1
lines changed
2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -32,10 +32,25 @@ class MigrateAllCommand extends BaseCommand
32
32
public function handle ()
33
33
{
34
34
$ directories = Storage::disk ('migrations ' )->allDirectories ();
35
+ if (!$ directories ){
36
+ $ directories = $ this ->getAllDirectories (database_path ('migrations ' ));
37
+ }
35
38
$ this ->call ('migrate ' ,['--force ' =>true ]);
36
39
collect ($ directories )->each (function ($ dir ){
37
40
$ this ->call ('migrate ' ,['--force ' =>true ,'--path ' =>'database/migrations/ ' .$ dir ]);
38
41
});
39
42
}
40
43
44
+ public function getAllDirectories ($ directory ) {
45
+ $ directories = [];
46
+ $ scannedItems = scandir ($ directory );
47
CE1D
+ foreach ($ scannedItems as $ item ) {
48
+ if (is_dir ($ directory . DIRECTORY_SEPARATOR . $ item ) && $ item != '. ' && $ item != '.. ' ) {
49
+ $ directories [] = $ item ;
50
+ }
51
+ }
52
+
53
+ return $ directories ;
54
+ }
55
+
41
56
}
Original file line number Diff line number Diff line change 57
57
'prefix ' => '' ,
58
58
'prefix_indexes ' => true ,
59
59
'strict ' => true ,
60
- 'engine ' => null ,
60
+ 'engine ' => ' InnoDB ROW_FORMAT=DYNAMIC ' ,
61
61
'options ' => extension_loaded ('pdo_mysql ' ) ? array_filter ([
62
62
PDO ::MYSQL_ATTR_SSL_CA => env ('MYSQL_ATTR_SSL_CA ' ),
63
63
]) : [],
You can’t perform that action at this time.
0 commit comments