File tree Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -32,34 +32,30 @@ public function handle()
32
32
33
33
$ this ->line ('Dumpping... ' );
34
34
$ this ->line ('' );
35
-
36
- $ migration = 'sla_ ' .gmdate ('Y_m_d_His ' ).'.sql ' ;
35
+ $ migration = 'sla_ ' . gmdate ('Y_m_d_His ' ) . '.sql ' ;
37
36
38
37
$ path = app_path ('../database/sla_dumps ' );
39
38
40
39
if (!File::exists ($ path )) {
41
40
File::makeDirectory ($ path , 493 , true );
42
41
}
43
42
44
- $ dumpMigration = $ path .'/ ' .$ migration ;
43
+ $ dumpMigration = $ path . '/ ' . $ migration ;
44
+
45
+ $ this ->info ('Output path will be: ' . $ dumpMigration );
46
+
47
+ exec ('mysqldump -u ' . env ('DB_USERNAME ' ) . ' -p ' . env ('DB_PASSWORD ' ) . ' ' . env ('DB_DATABASE ' ) . ' -r ' . $ dumpMigration . ' 2>/dev/null ' , $ output , $ return_var );
45
48
46
- $ this ->info ('Output path will be: ' .$ dumpMigration );
47
- $ this ->line ('' );
48
- exec ('mysqldump -u ' .env ('DB_USERNAME ' ).' -p ' .env ('DB_DATABASE ' ).' -r ' .$ dumpMigration , $ output , $ return_var );
49
49
$ this ->line ('' );
50
50
51
51
if ($ return_var != 0 ) {
52
52
File::delete ($ dumpMigration );
53
53
54
54
$ this ->error ('Dumpping error! ' );
55
55
} else {
56
- $ this ->line ('Dumpping Done! ' );
56
+ $ this ->info ('Dumpping Done! ' );
57
57
}
58
58
59
59
$ this ->line ('' );
60
- $ this ->line ('*** ' );
61
- $ this ->line ('' );
62
- $ this ->info ('Done! ' );
63
- $ this ->line (' _________________________________________________________________________________________________ ' );
64
60
}
65
61
}
You can’t perform that action at this time.
0 commit comments