@@ 1053-1058 (lines=6) @@ | ||
1050 | if ($action == 'add-column') { |
|
1051 | $nn = ($params->nn ? " NOT NULL" : ""); |
|
1052 | $default = null; |
|
1053 | if ($params->default === null) { |
|
1054 | $default = " DEFAULT NULL"; |
|
1055 | } elseif (strlen($params->default)) { |
|
1056 | $default = " DEFAULT {$this->_escape($params->default)}"; |
|
1057 | } |
|
1058 | $this->sql .= " ADD COLUMN `{$params->name}` {$params->dataType}" . $nn . $default; |
|
1059 | } elseif ($action == 'drop-column') { |
|
1060 | $this->sql .= " DROP COLUMN "; |
|
1061 | foreach ($params as $col) { |
|
@@ 1072-1077 (lines=6) @@ | ||
1069 | $this->sql .= " MODIFY COLUMN"; |
|
1070 | $nn = ($params->nn ? " NOT NULL" : ""); |
|
1071 | $default = null; |
|
1072 | if ($params->default === null) { |
|
1073 | $default = " DEFAULT NULL"; |
|
1074 | } elseif (strlen($params->default)) { |
|
1075 | $default = " DEFAULT {$this->_escape($params->default)}"; |
|
1076 | } |
|
1077 | $this->sql .= " `{$params->name}` `{$params->new_name}` {$params->dataType}" . $nn . $default; |
|
1078 | } |
|
1079 | ||
1080 | if (self::$autorun) { |