diff options
Diffstat (limited to 'Bugzilla/DB/Schema/Mysql.pm')
-rw-r--r-- | Bugzilla/DB/Schema/Mysql.pm | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Bugzilla/DB/Schema/Mysql.pm b/Bugzilla/DB/Schema/Mysql.pm index 6340998b7..07d7036e4 100644 --- a/Bugzilla/DB/Schema/Mysql.pm +++ b/Bugzilla/DB/Schema/Mysql.pm @@ -100,11 +100,8 @@ sub _get_create_index_ddl { # MySQL has a simpler ALTER TABLE syntax than ANSI. sub get_alter_column_ddl { - my ($self, $table, $column, $new_def) = @_; - my $new_ddl = $self->get_type_ddl($new_def); - return (("ALTER TABLE $table CHANGE COLUMN $column $column $new_ddl")); } @@ -113,4 +110,10 @@ sub get_drop_index_ddl { return ("DROP INDEX $name ON $table"); } +sub get_rename_column_ddl { + my ($self, $table, $old_name, $new_name) = @_; + my $def = $self->get_type_ddl($self->get_column($table, $old_name)); + return ("ALTER TABLE $table CHANGE COLUMN $old_name $new_name $def"); +} + 1; |