Skip to content

Commit

Permalink
fix: compileChange
Browse files Browse the repository at this point in the history
  • Loading branch information
yajra committed Jul 13, 2024
1 parent 2412da1 commit adb9b93
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/Oci8/Schema/Grammars/OracleGrammar.php
Original file line number Diff line number Diff line change
Expand Up @@ -917,26 +917,26 @@ public function compileChange(Blueprint $blueprint, Fluent $command, Connection
{
$columns = [];

foreach ($blueprint->getChangedColumns() as $column) {
$changes = [$this->getType($column).$this->modifyCollate($blueprint, $column)];
$column = $command->column;

foreach ($this->modifiers as $modifier) {
if ($modifier === 'Collate') {
continue;
}
$changes = [$this->getType($column).$this->modifyCollate($blueprint, $column)];

foreach ($this->modifiers as $modifier) {
if ($modifier === 'Collate') {
continue;
}

if (method_exists($this, $method = "modify{$modifier}")) {
$constraints = (array) $this->{$method}($blueprint, $column);
if (method_exists($this, $method = "modify{$modifier}")) {
$constraints = (array) $this->{$method}($blueprint, $column);

foreach ($constraints as $constraint) {
$changes[] = $constraint;
}
foreach ($constraints as $constraint) {
$changes[] = $constraint;
}
}

$columns[] = 'modify '.$this->wrap($column).' '.implode(' ', array_filter(array_map('trim', $changes)));
}

$columns[] = 'modify '.$this->wrap($column).' '.implode(' ', array_filter(array_map('trim', $changes)));

return 'alter table '.$this->wrapTable($blueprint).' '.implode(' ', $columns);
}

Expand Down

0 comments on commit adb9b93

Please sign in to comment.