Sha256: 80185afe0e2bd1992350ae27aae3d9c3ee5db767b4f2d6fcb8b3a2b45eb5377b

Contents?: true

Size: 526 Bytes

Versions: 3

Compression:

Stored size: 526 Bytes

Contents

class CreateApprovalRequests < ActiveRecord::Migration[5.1]
  def change
    create_table :approval_requests do |t|
      t.integer  :request_user_id, null: false
      t.integer  :respond_user_id
      t.integer  :state,           null: false, limit: 1, default: 0
      t.datetime :requested_at,    null: false
      t.datetime :cancelled_at
      t.datetime :approved_at
      t.datetime :rejected_at

      t.timestamps

      t.index :request_user_id
      t.index :respond_user_id
      t.index :state
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
approval-0.3.2 spec/rails/rails-5.1.2/db/migrate/20170816102906_create_approval_requests.rb
approval-0.3.1 spec/rails/rails-5.1.2/db/migrate/20170816024438_create_approval_requests.rb
approval-0.2.0 spec/rails/rails-5.1.2/db/migrate/20170731101409_create_approval_requests.rb