Sha256: b8c47c0e64a588d62f708203c0c17b28a282b1382955171e5ecfb468042f18b7

Contents?: true

Size: 942 Bytes

Versions: 32

Compression:

Stored size: 942 Bytes

Contents

class CreateShipitPullRequests < ActiveRecord::Migration[5.0]
  def change
    create_table :pull_requests do |t|
      t.references :stack, foreign_key: true, null: false
      t.integer :number, null: false
      t.string :title, limit: 256
      t.integer :github_id, limit: 8
      t.string :api_url, limit: 1024
      t.string :state
      t.references :head, foreign_key: {to_table: :commits}
      t.boolean :mergeable, null: true
      t.integer :additions, null: false, default: 0
      t.integer :deletions, null: false, default: 0
      t.string :merge_status, null: false, limit: 30
      t.string :rejection_reason, null: true
      t.datetime :merge_requested_at, null: false
      t.references :merge_requested_by, foreign_key: {to_table: :users}
      t.timestamps

      t.index [:stack_id, :number], unique: true
      t.index [:stack_id, :github_id], unique: true
      t.index [:stack_id, :merge_status]
    end
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
shipit-engine-0.39.0 db/migrate/20170130113633_create_shipit_pull_requests.rb
shipit-engine-0.38.0 db/migrate/20170130113633_create_shipit_pull_requests.rb
shipit-engine-0.37.0 db/migrate/20170130113633_create_shipit_pull_requests.rb
shipit-engine-0.36.1 db/migrate/20170130113633_create_shipit_pull_requests.rb
shipit-engine-0.36.0 db/migrate/20170130113633_create_shipit_pull_requests.rb
shipit-engine-0.35.1 db/migrate/20170130113633_create_shipit_pull_requests.rb
shipit-engine-0.35.0 db/migrate/20170130113633_create_shipit_pull_requests.rb
shipit-engine-0.34.0 db/migrate/20170130113633_create_shipit_pull_requests.rb
shipit-engine-0.33.0 db/migrate/20170130113633_create_shipit_pull_requests.rb
shipit-engine-0.32.0 db/migrate/20170130113633_create_shipit_pull_requests.rb
shipit-engine-0.31.0 db/migrate/20170130113633_create_shipit_pull_requests.rb
shipit-engine-0.30.0 db/migrate/20170130113633_create_shipit_pull_requests.rb
shipit-engine-0.29.0 db/migrate/20170130113633_create_shipit_pull_requests.rb
shipit-engine-0.28.1 db/migrate/20170130113633_create_shipit_pull_requests.rb
shipit-engine-0.28.0 db/migrate/20170130113633_create_shipit_pull_requests.rb
shipit-engine-0.27.1 db/migrate/20170130113633_create_shipit_pull_requests.rb
shipit-engine-0.27.0 db/migrate/20170130113633_create_shipit_pull_requests.rb
shipit-engine-0.26.0 db/migrate/20170130113633_create_shipit_pull_requests.rb
shipit-engine-0.25.1 db/migrate/20170130113633_create_shipit_pull_requests.rb
shipit-engine-0.25.0 db/migrate/20170130113633_create_shipit_pull_requests.rb