Sha256: b285c7dca0476f56d8f1e481a564acf312358f74d2731e9fd627de1dc941e5f4
Contents?: true
Size: 660 Bytes
Versions: 11
Compression:
Stored size: 660 Bytes
Contents
class CreateTrends < ActiveRecord::Migration[6.0] def up create_table :trends do |t| t.string :trendable_type, :limit => 255 t.integer :trendable_id t.string :name, :limit => 255 t.string :type, :limit => 255 t.string :fact_value, :limit => 255 t.string :fact_name, :limit => 255 t.timestamps null: true end add_index :trends, :type add_index :trends, %i[trendable_type trendable_id] add_index :trends, :fact_value end def down remove_index :trends, :type remove_index :trends, %i[trendable_type trendable_id] remove_index :trends, :fact_value drop_table :trends end end
Version data entries
11 entries across 11 versions & 1 rubygems