Welcome to mirror list, hosted at ThFree Co, Russian Federation.

20180613081317_create_ci_builds_runner_session.rb « migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e550c07b9ab10c5151c68baeae3a71ae86ffc688 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.

class CreateCiBuildsRunnerSession < ActiveRecord::Migration
  include Gitlab::Database::MigrationHelpers

  # Set this constant to true if this migration requires downtime.
  DOWNTIME = false

  def change
    create_table :ci_builds_runner_session, id: :bigserial do |t|
      t.integer :build_id, null: false
      t.string :url, null: false
      t.string :certificate
      t.string :authorization

      t.foreign_key :ci_builds, column: :build_id, on_delete: :cascade
      t.index :build_id, unique: true
    end
  end
end