| @@ 865-877 (lines=13) @@ | ||
| 862 | ||
| 863 | $tableSql = []; |
|
| 864 | ||
| 865 | if ( ! $this->onSchemaAlterTable($diff, $tableSql)) { |
|
| 866 | $sql = array_merge($sql, $commentsSQL); |
|
| 867 | ||
| 868 | if ($diff->newName !== false) { |
|
| 869 | $sql[] = 'ALTER TABLE ' . $diff->getName($this)->getQuotedName($this) . ' RENAME TO ' . $diff->getNewName()->getQuotedName($this); |
|
| 870 | } |
|
| 871 | ||
| 872 | $sql = array_merge( |
|
| 873 | $this->getPreAlterTableIndexForeignKeySQL($diff), |
|
| 874 | $sql, |
|
| 875 | $this->getPostAlterTableIndexForeignKeySQL($diff) |
|
| 876 | ); |
|
| 877 | } |
|
| 878 | ||
| 879 | return array_merge($sql, $tableSql, $columnSql); |
|
| 880 | } |
|
| @@ 613-625 (lines=13) @@ | ||
| 610 | ||
| 611 | $tableSql = []; |
|
| 612 | ||
| 613 | if ( ! $this->onSchemaAlterTable($diff, $tableSql)) { |
|
| 614 | $sql = array_merge($sql, $commentsSQL); |
|
| 615 | ||
| 616 | if ($diff->newName !== false) { |
|
| 617 | $sql[] = 'ALTER TABLE ' . $diff->getName($this)->getQuotedName($this) . ' RENAME TO ' . $diff->getNewName()->getQuotedName($this); |
|
| 618 | } |
|
| 619 | ||
| 620 | $sql = array_merge( |
|
| 621 | $this->getPreAlterTableIndexForeignKeySQL($diff), |
|
| 622 | $sql, |
|
| 623 | $this->getPostAlterTableIndexForeignKeySQL($diff) |
|
| 624 | ); |
|
| 625 | } |
|
| 626 | ||
| 627 | return array_merge($sql, $tableSql, $columnSql); |
|
| 628 | } |
|