Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fix modifications of primary key column in more cases on MySQL

  • Loading branch information...
commit 67c0ad5b55683153fd06b2642082afa48a49ba6a 1 parent 23f9c4b
Jeremy Evans authored

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  lib/sequel/adapters/shared/mysql.rb
2  lib/sequel/adapters/shared/mysql.rb
@@ -195,7 +195,7 @@ def alter_table_op_sql(table, op)
195 195
           opts[:null] = o == :set_column_null ? op[:null] : opts[:allow_null]
196 196
           opts[:default] = o == :set_column_default ? op[:default] : opts[:ruby_default]
197 197
           opts.delete(:default) if opts[:default] == nil
198  
-          opts.delete(:primary_key) if op[:op] == :rename_column
  198
+          opts.delete(:primary_key)
199 199
           "CHANGE COLUMN #{quote_identifier(op[:name])} #{column_definition_sql(op.merge(opts))}"
200 200
         when :drop_constraint
201 201
           type = case op[:type]

0 notes on commit 67c0ad5

Please sign in to comment.
Something went wrong with that request. Please try again.