/**
  * Compile a create table command.
  *
  * @param  \Illuminate\Database\Schema\Blueprint $blueprint
  * @param  \Illuminate\Support\Fluent $command
  * @param  \Illuminate\Database\Connection $connection
  * @param string $comment
  * @return string
  */
 public function compileCreate(Blueprint $blueprint, Fluent $command, Connection $connection)
 {
     $sql = parent::compileCreate($blueprint, $command, $connection);
     if (isset($blueprint->comment)) {
         $blueprint->comment = str_replace("'", "\\'", $blueprint->comment);
         $sql .= " comment = '" . $blueprint->comment . "'";
     }
     return $sql;
 }
Exemple #2
0
 /**
  * Compile a create table command.
  *
  * @param  \Illuminate\Database\Schema\Blueprint  $blueprint
  * @param  \Illuminate\Support\Fluent  $command
  * @param  \Illuminate\Database\Connection  $connection
  * @return string
  */
 public function compileCreate(IlluminateBlueprint $blueprint, Fluent $command, Connection $connection)
 {
     $sql = parent::compileCreate($blueprint, $command, $connection);
     // Table annotation support
     if (isset($blueprint->comment)) {
         $comment = str_replace("'", "\\'", $blueprint->comment);
         $sql .= " comment = '{$comment}'";
     }
     return $sql;
 }
Exemple #3
0
 public function compileCreate(Blueprint $blueprint, Fluent $command, Connection $connection)
 {
     $sql = parent::compileCreate($blueprint, $command, $connection);
     if (isset($blueprint->rowFormat)) {
         $sql .= ' row_format = ' . $blueprint->rowFormat;
     } elseif (!is_null($rowFormat = $connection->getConfig('row_format'))) {
         $sql .= ' row_format = ' . $rowFormat;
     }
     return $sql;
 }