Sha256: 3c0d4472b765e889f100ca4aeb8c43c4bab779ea949edc7e44bf535721e0c983

Contents?: true

Size: 425 Bytes

Versions: 2

Compression:

Stored size: 425 Bytes

Contents

class CreateSettings < ActiveRecord::Migration[4.2]
  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, null: true, limit: 30
      t.timestamps
    end

    add_index :settings, %i(thing_type thing_id var), unique: true
  end

  def self.down
    drop_table :settings
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
kono_mailup-0.1.0 db/migrate/20171124083941_create_settings.rb
kono_mailup-0.0.2 db/migrate/20171124083941_create_settings.rb