This project is archived and is in readonly mode.

#466 ✓resolved
Diego Algorta

rename_column doesn't preserve default value on MySQL

Reported by Diego Algorta | June 22nd, 2008 @ 12:47 AM

migration 1

create_table "users", :force => true do |t| t.column :name, :string, :default => '' end

migration 2

rename_column :users, :name, :first_name

result: the column first_name doesn't have the default value anymore.

I'm attaching a patch including a test for this issue.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Pages