From e6493eb9b76de73afef2706493efd090dfff4ecc Mon Sep 17 00:00:00 2001 From: Jacob Dunphy Date: Thu, 15 Jan 2009 13:30:44 -0800 Subject: Sqlite adapter's copy_table incorrectly attempts to recreate a primary key id (:id => true in the create_table) if an :id column is present, even if it isn't a primary_key. This fix sets :id => false if there is an :id column, but it's not the primary_key. Signed-off-by: Michael Koziarski [#1766 state:committed] --- activerecord/test/schema/schema.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'activerecord/test/schema') diff --git a/activerecord/test/schema/schema.rb b/activerecord/test/schema/schema.rb index 094932d375..d44faf04cc 100644 --- a/activerecord/test/schema/schema.rb +++ b/activerecord/test/schema/schema.rb @@ -154,6 +154,11 @@ ActiveRecord::Schema.define do t.string :name end + create_table :goofy_string_id, :force => true, :id => false do |t| + t.string :id, :null => false + t.string :info + end + create_table :items, :force => true do |t| t.column :name, :integer end -- cgit v1.2.3