Sha256: 99a0e01204ca6b9bb9428532671f63e1cf988a45670c077c22b4e0ab660aabaf

Contents?: true

Size: 545 Bytes

Versions: 9

Compression:

Stored size: 545 Bytes

Contents

class CreateApprovalRequests < ActiveRecord::Migration<%= migration_version %>
  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

9 entries across 9 versions & 1 rubygems

Version Path
approval-0.3.5 lib/generators/approval/templates/create_approval_requests.rb.tt
approval-0.3.4 lib/generators/approval/templates/create_approval_requests.rb.tt
approval-0.3.3 lib/generators/approval/templates/create_approval_requests.rb.tt
approval-0.3.2 lib/generators/approval/templates/create_approval_requests.rb.tt
approval-0.3.1 lib/generators/approval/templates/create_approval_requests.rb.tt
approval-0.3.0 lib/generators/approval/templates/create_approval_requests.rb.tt
approval-0.2.3 lib/generators/approval/templates/create_approval_requests.rb.tt
approval-0.2.2 lib/generators/approval/templates/create_approval_requests.rb.tt
approval-0.2.0 lib/generators/approval/templates/create_approval_requests.rb.tt