aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/schema
diff options
context:
space:
mode:
authorNeeraj Singh <neerajdotname@gmail.com>2010-06-27 11:17:44 -0400
committerJosé Valim <jose.valim@gmail.com>2010-07-08 23:24:12 +0200
commit1e53404fe9c39ad0849894d73e431315be8c0bf0 (patch)
tree57f1bc98e37e8f5ed17ed8126d1b43d3c6578288 /activerecord/test/schema
parent87f64ef05e48ad8b374022ca944e34a7ad68551d (diff)
downloadrails-1e53404fe9c39ad0849894d73e431315be8c0bf0.tar.gz
rails-1e53404fe9c39ad0849894d73e431315be8c0bf0.tar.bz2
rails-1e53404fe9c39ad0849894d73e431315be8c0bf0.zip
reset_counter should work with non-traditional belongs_to and polymorphic belongs_to
[#4984 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'activerecord/test/schema')
-rw-r--r--activerecord/test/schema/schema.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/activerecord/test/schema/schema.rb b/activerecord/test/schema/schema.rb
index b212e7cff2..bea351b95a 100644
--- a/activerecord/test/schema/schema.rb
+++ b/activerecord/test/schema/schema.rb
@@ -82,6 +82,12 @@ ActiveRecord::Schema.define do
t.string :name
end
+ create_table :cars, :force => true do |t|
+ t.string :name
+ t.integer :engines_count
+ t.integer :wheels_count
+ end
+
create_table :categories, :force => true do |t|
t.string :name, :null => false
t.string :type
@@ -179,6 +185,9 @@ ActiveRecord::Schema.define do
end
add_index :edges, [:source_id, :sink_id], :unique => true, :name => 'unique_edge_index'
+ create_table :engines, :force => true do |t|
+ t.integer :car_id
+ end
create_table :entrants, :force => true do |t|
t.string :name, :null => false
@@ -566,6 +575,10 @@ ActiveRecord::Schema.define do
t.integer :zine_id
end
+ create_table :wheels, :force => true do |t|
+ t.references :wheelable, :polymorphic => true
+ end
+
create_table :zines, :force => true do |t|
t.string :title
end