aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/schema
diff options
context:
space:
mode:
authorJim Remsik and Tim Pope <dev+bigtiger+tpope@hashrocket.com>2009-03-09 13:42:51 +0000
committerPratik Naik <pratiknaik@gmail.com>2009-03-09 13:43:28 +0000
commit1e6c50e21bdb8c99116a7dc6921ef3eb4ed9531a (patch)
tree1658deea2328ef01332fd8589dfaa461f4186d87 /activerecord/test/schema
parent1ab2ff58eddee8ac523624dd097424f9a760ad8b (diff)
downloadrails-1e6c50e21bdb8c99116a7dc6921ef3eb4ed9531a.tar.gz
rails-1e6c50e21bdb8c99116a7dc6921ef3eb4ed9531a.tar.bz2
rails-1e6c50e21bdb8c99116a7dc6921ef3eb4ed9531a.zip
Ensure has_many :through works with changed primary keys [#736 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'activerecord/test/schema')
-rw-r--r--activerecord/test/schema/schema.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/test/schema/schema.rb b/activerecord/test/schema/schema.rb
index 9ebf1d82be..ea848a2940 100644
--- a/activerecord/test/schema/schema.rb
+++ b/activerecord/test/schema/schema.rb
@@ -425,6 +425,11 @@ ActiveRecord::Schema.define do
t.column :taggings_count, :integer, :default => 0
end
+ create_table :toys, :primary_key => :toy_id ,:force => true do |t|
+ t.string :name
+ t.integer :pet_id, :integer
+ end
+
create_table :treasures, :force => true do |t|
t.column :name, :string
t.column :looter_id, :integer