Skip to content
This repository has been archived by the owner on Mar 19, 2021. It is now read-only.

Commit

Permalink
Update test schema.rb to match current migration
Browse files Browse the repository at this point in the history
However, set force: true and didn't set indices

Fixes test failures for postgresql::

No integer type has byte size 11. Use a numeric with precision 0
instead.

https://travis-ci.org/mbleigh/acts-as-taggable-on/jobs/15196579

see rails/rails#6272
  • Loading branch information
bf4 committed Dec 10, 2013
1 parent bd04da4 commit 3a0b6a9
Showing 1 changed file with 25 additions and 21 deletions.
46 changes: 25 additions & 21 deletions spec/schema.rb
@@ -1,59 +1,63 @@
ActiveRecord::Schema.define :version => 0 do
create_table "taggings", :force => true do |t|
t.integer "tag_id", :limit => 11
t.integer "taggable_id", :limit => 11
t.string "taggable_type"
t.string "context"
t.datetime "created_at"
t.integer "tagger_id", :limit => 11
t.string "tagger_type"
create_table :tags, :force => true do |t|
t.string :name
end

add_index "taggings", ["tag_id"], :name => "index_taggings_on_tag_id"
add_index "taggings", ["taggable_id", "taggable_type", "context"], :name => "index_taggings_on_taggable_id_and_taggable_type_and_context"
create_table :taggings, :force => true do |t|
t.references :tag

create_table "tags", :force => true do |t|
t.string "name"
# You should make sure that the column created is
# long enough to store the required class names.
t.references :taggable, :polymorphic => true
t.references :tagger, :polymorphic => true

# Limit is created to prevent MySQL error on index
# length for MyISAM table type: http://bit.ly/vgW2Ql
t.string :context, :limit => 128

t.datetime :created_at
end

# above copied from
# generators/acts_as_taggable_on/migration/migration_generator

create_table :taggable_models, :force => true do |t|
t.column :name, :string
t.column :type, :string
end

create_table :non_standard_id_taggable_models, :primary_key => "an_id", :force => true do |t|
t.column :name, :string
t.column :type, :string
end

create_table :untaggable_models, :force => true do |t|
t.column :taggable_model_id, :integer
t.column :name, :string
end

create_table :cached_models, :force => true do |t|
t.column :name, :string
t.column :type, :string
t.column :cached_tag_list, :string
end

create_table :other_cached_models, :force => true do |t|
t.column :name, :string
t.column :type, :string
t.column :cached_language_list, :string
t.column :cached_language_list, :string
t.column :cached_status_list, :string
t.column :cached_glass_list, :string
end

create_table :users, :force => true do |t|
t.column :name, :string
end

create_table :other_taggable_models, :force => true do |t|
t.column :name, :string
t.column :type, :string
end

create_table :ordered_taggable_models, :force => true do |t|
t.column :name, :string
t.column :type, :string
Expand Down

0 comments on commit 3a0b6a9

Please sign in to comment.