Sha256: d176f3313e4a7334f0adde458a9de0765f972a3c941533b1f861359244b2f2eb

Contents?: true

Size: 412 Bytes

Versions: 1

Compression:

Stored size: 412 Bytes

Contents

class CreateSettings < ActiveRecord::Migration
  def self.up
    create_table :settings do |t|
      t.string :var, null: false
      t.text   :value, null: true
      t.integer :thing_id, null: true
      t.string :thing_type, limit: 30, null: true
      t.timestamps
    end
    
    add_index :settings, [ :thing_type, :thing_id, :var ], unique: true
  end

  def self.down
    drop_table :settings
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
home_page-0.0.6 db/migrate/20150313154924_create_settings.rb