From a7a1531fe5d030d47d63bfcd86a7168a8437ff86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francisco=20Javier=20L=C3=B3pez?= Date: Thu, 5 Jul 2018 13:55:10 +0000 Subject: Web Terminal Ci Build --- ...0180613081317_create_ci_builds_runner_session.rb | 21 +++++++++++++++++++++ db/schema.rb | 10 ++++++++++ 2 files changed, 31 insertions(+) create mode 100644 db/migrate/20180613081317_create_ci_builds_runner_session.rb (limited to 'db') diff --git a/db/migrate/20180613081317_create_ci_builds_runner_session.rb b/db/migrate/20180613081317_create_ci_builds_runner_session.rb new file mode 100644 index 00000000000..e550c07b9ab --- /dev/null +++ b/db/migrate/20180613081317_create_ci_builds_runner_session.rb @@ -0,0 +1,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 diff --git a/db/schema.rb b/db/schema.rb index 9a4e3fe5555..c9aaf80f059 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -358,6 +358,15 @@ ActiveRecord::Schema.define(version: 20180629191052) do add_index "ci_builds_metadata", ["build_id"], name: "index_ci_builds_metadata_on_build_id", unique: true, using: :btree add_index "ci_builds_metadata", ["project_id"], name: "index_ci_builds_metadata_on_project_id", using: :btree + create_table "ci_builds_runner_session", id: :bigserial, force: :cascade do |t| + t.integer "build_id", null: false + t.string "url", null: false + t.string "certificate" + t.string "authorization" + end + + add_index "ci_builds_runner_session", ["build_id"], name: "index_ci_builds_runner_session_on_build_id", unique: true, using: :btree + create_table "ci_group_variables", force: :cascade do |t| t.string "key", null: false t.text "value" @@ -2191,6 +2200,7 @@ ActiveRecord::Schema.define(version: 20180629191052) do add_foreign_key "ci_builds", "projects", name: "fk_befce0568a", on_delete: :cascade add_foreign_key "ci_builds_metadata", "ci_builds", column: "build_id", on_delete: :cascade add_foreign_key "ci_builds_metadata", "projects", on_delete: :cascade + add_foreign_key "ci_builds_runner_session", "ci_builds", column: "build_id", on_delete: :cascade add_foreign_key "ci_group_variables", "namespaces", column: "group_id", name: "fk_33ae4d58d8", on_delete: :cascade add_foreign_key "ci_job_artifacts", "ci_builds", column: "job_id", on_delete: :cascade add_foreign_key "ci_job_artifacts", "projects", on_delete: :cascade -- cgit v1.2.3