Sha256: f04f6e84ca400facc81896d9006517e404a7d1313d2e8cffb60b0eed8b9bf071
Contents?: true
Size: 399 Bytes
Versions: 6
Compression:
Stored size: 399 Bytes
Contents
class RailsSettingsMigration < ActiveRecord::Migration def self.up create_table :settings do |t| t.string :var, :null => false t.text :value t.references :target, :null => false, :polymorphic => true t.timestamps end add_index :settings, [ :target_type, :target_id, :var ], :unique => true end def self.down drop_table :settings end end
Version data entries
6 entries across 6 versions & 1 rubygems