writeSqlFile() public method

Write a migration SQL file to the given path
public writeSqlFile ( string $path, string $direction = self::DIRECTION_UP ) : boolean
$path string The path to write the migration SQL file.
$direction string The direction to execute.
return boolean $written
コード例 #1
0
 /**
  * @param Version $version
  * @param         $direction
  * @param         $path
  */
 public function executeToFile(Version $version, $direction, $path)
 {
     $path = is_bool($path) ? getcwd() : $path;
     $version->writeSqlFile($path, $direction);
     $verb = $direction === 'down' ? 'Rolled back' : 'Migrated';
     $this->note($version->getVersion(), $version, false, $verb);
 }