- . "probably ask for some help in performing your schema updates.\n\n"
- . "If you know what you are doing, you can continue with --force", true );
+ . "probably ask for some help in performing your schema updates or use\n"
+ . "the --noschema and --schema options to get an SQL file for someone\n"
+ . "else to inspect and run.\n\n"
+ . "If you know what you are doing, you can continue with --force\n", true );
+ }
+
+ $this->fileHandle = null;
+ if( substr( $this->getOption( 'schema' ), 0, 2 ) === "--" ) {
+ $this->error( "The --schema option requires a file as an argument.\n", true );
+ } else if( $this->hasOption( 'schema' ) ) {
+ $file = $this->getOption( 'schema' );
+ $this->fileHandle = fopen( $file, "w" );
+ if( $this->fileHandle === false ) {
+ $err = error_get_last();
+ $this->error( "Problem opening the schema file for writing: $file\n\t{$err['message']}", true );
+ }