Sha256: d4155edcf8b8bd473bd11f06d166eef1e8821f33af7ac7115299a8dcfb0b7769
Contents?: true
Size: 583 Bytes
Versions: 20
Compression:
Stored size: 583 Bytes
Contents
class CreatePreferences < ActiveRecord::Migration def self.up create_table :preferences do |t| t.string :attribute, :null => false t.references :owner, :polymorphic => true, :null => false t.references :group, :polymorphic => true t.string :value t.timestamps end add_index :preferences, [:owner_id, :owner_type, :attribute, :group_id, :group_type], :unique => true, :name => 'index_preferences_on_owner_and_attribute_and_preference' end def self.down drop_table :preferences end end
Version data entries
20 entries across 20 versions & 3 rubygems