迁移时 新的一列默认值如何设定成已有列的值

迁移时 新的一列默认值怎么设定成已有列的值C/C++ codeclass AddLoginToUser ActiveRecord::Migrationde

迁移时 新的一列默认值怎么设定成已有列的值

C/C++ code
class AddLoginToUser < ActiveRecord::Migration  def self.up    add_column :users, :login, :string  end  def self.down    remove_column :users, :login  endend

我怎么把login的默认值设定成已有列的值 , 比如 :name
而且还的是小写的

[解决办法]
Perl code
change_table :table_name do |t|  t.login :name, :stringend