Sha256: 1f2ed6bd6b5610217ce59c8aea83a26ff2509d790041929aa2ed3e8ff74bd036
Contents?: true
Size: 479 Bytes
Versions: 10
Compression:
Stored size: 479 Bytes
Contents
class CreatePreferences < ActiveRecord::Migration def self.up create_table :preferences do |t| t.integer :user_id, null: false t.string :category, null: false t.string :name, null: false t.integer :value, null: false t.timestamps end add_index :preferences, :user_id add_index :preferences, [:user_id, :category] add_index :preferences, [:category, :name, :value] end def self.down drop_table :preferences end end
Version data entries
10 entries across 6 versions & 1 rubygems