diff options
Diffstat (limited to 'activerecord/test/fixtures')
-rw-r--r-- | activerecord/test/fixtures/db_definitions/schema.rb | 3 | ||||
-rw-r--r-- | activerecord/test/fixtures/tagging.rb | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/activerecord/test/fixtures/db_definitions/schema.rb b/activerecord/test/fixtures/db_definitions/schema.rb index 1cf4dee7a5..f2e9eacb08 100644 --- a/activerecord/test/fixtures/db_definitions/schema.rb +++ b/activerecord/test/fixtures/db_definitions/schema.rb @@ -8,6 +8,7 @@ ActiveRecord::Schema.define do create_table "tags", :force => true do |t| t.column "name", :string + t.column :taggings_count, :integer, :default => 0 end create_table "categorizations", :force => true do |t| @@ -16,4 +17,6 @@ ActiveRecord::Schema.define do t.column "author_id", :integer end + add_column :posts, :taggings_count, :integer, :default => 0 + end
\ No newline at end of file diff --git a/activerecord/test/fixtures/tagging.rb b/activerecord/test/fixtures/tagging.rb index 06d0144b5a..8bc844c370 100644 --- a/activerecord/test/fixtures/tagging.rb +++ b/activerecord/test/fixtures/tagging.rb @@ -1,4 +1,4 @@ class Tagging < ActiveRecord::Base belongs_to :tag - belongs_to :taggable, :polymorphic => true + belongs_to :taggable, :polymorphic => true, :counter_cache => true end
\ No newline at end of file |