Пример #1
0
 /**
  * Adds a statement to add a geometry column
  *
  * @param Blueprint $blueprint
  * @param Fluent $command
  * @return string
  */
 protected function compileGeometry(Blueprint $blueprint, Fluent $command)
 {
     $dimensions = $command->dimensions ?: 2;
     $typmod = $command->typmod ? 'true' : 'false';
     $srid = $command->srid ?: 4326;
     return sprintf("SELECT AddGeometryColumn('%s', '%s', %d, '%s', %d, %s)", $blueprint->getTable(), $command->column, $srid, strtoupper($command->type), $dimensions, $typmod);
 }