プライマリーキーを「ID」以外にする方法
def self.up create_table :testsun do |t| t.column :ex_word, :primary_key t.column :ex_word_type, :string end end
これではエラー。
「id」という名前を無効にしてやらないといけない。
def self.up create_table :testsun, {:id => false} do |t| t.column :ex_word, :primary_key t.column :ex_word_type, :string end end
これで可能。