Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix modifications of primary key column in more cases on MySQL

  • Loading branch information...
commit 67c0ad5b55683153fd06b2642082afa48a49ba6a 1 parent 23f9c4b
@jeremyevans authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/sequel/adapters/shared/mysql.rb
View
2  lib/sequel/adapters/shared/mysql.rb
@@ -195,7 +195,7 @@ def alter_table_op_sql(table, op)
opts[:null] = o == :set_column_null ? op[:null] : opts[:allow_null]
opts[:default] = o == :set_column_default ? op[:default] : opts[:ruby_default]
opts.delete(:default) if opts[:default] == nil
- opts.delete(:primary_key) if op[:op] == :rename_column
+ opts.delete(:primary_key)
"CHANGE COLUMN #{quote_identifier(op[:name])} #{column_definition_sql(op.merge(opts))}"
when :drop_constraint
type = case op[:type]
Please sign in to comment.
Something went wrong with that request. Please try again.