File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
webfiori/framework/cli/commands Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -117,11 +117,15 @@ public function exec() : int {
117117 }
118118 } else if ($ answer == 'Database migration. ' ) {
119119 $ create = new \webfiori \framework \cli \helpers \CreateMigration ($ this );
120- $ create ->writeClass ();
121- $ writer = $ create ->getWriter ();
122- $ this ->info ("Migration Name: " .$ writer ->getMigrationName ());
123- $ this ->info ("Migration Order: " .$ writer ->getMigrationOrder ());
124- return 0 ;
120+ if ($ create ->isConfigured ()) {
121+ $ create ->writeClass ();
122+ $ writer = $ create ->getWriter ();
123+ $ this ->info ("Migration Name: " .$ writer ->getMigrationName ());
124+ $ this ->info ("Migration Order: " .$ writer ->getMigrationOrder ());
125+ return 0 ;
126+ } else {
127+ return -1 ;
128+ }
125129 }
126130
127131 return 0 ;
You can’t perform that action at this time.
0 commit comments