Sha256: ee767d470d42704fd191f66607ae6bbd884cfdaa461c4d8ff1b92db9470e16a5
Contents?: true
Size: 1.12 KB
Versions: 9
Compression:
Stored size: 1.12 KB
Contents
# This migration comes from spree (originally 20160511071954) class ActsAsTaggableOnSpreeMigration < ActiveRecord::Migration[4.2] def self.up create_table :spree_tags do |t| t.string :name t.integer :taggings_count, default: 0 end create_table :spree_taggings do |t| t.references :tag # 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 add_index :spree_tags, :name, unique: true add_index :spree_taggings, [ :tag_id, :taggable_id, :taggable_type, :context, :tagger_id, :tagger_type ], unique: true, name: "spree_taggings_idx" end def self.down drop_table :spree_taggings drop_table :spree_tags end end
Version data entries
9 entries across 9 versions & 2 rubygems