Sha256: 2dc9a5c28c989b22440fe6a1a15333a6c396cd0736aaaa40665fe100e52c1236
Contents?: true
Size: 514 Bytes
Versions: 6
Compression:
Stored size: 514 Bytes
Contents
class CreatePreferences < ActiveRecord::Migration def up create_table :preferences do |t| t.string :name, :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, :name, :group_id, :group_type], :unique => true, :name => 'index_preferences_on_owner_and_name_and_preference' end def down drop_table :preferences end end
Version data entries
6 entries across 3 versions & 1 rubygems