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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2018-09-17 12:26:22 +0300
committerAlessio Caiazza <acaiazza@gitlab.com>2018-10-02 17:57:37 +0300
commit3fc4c096a592fbc0af3a8d60d2026ed673126a2f (patch)
treec886cf4b6a4b07c47576db4fb28e3c87f2907dae /db
parentd5184e0d8b48bc221e1ea401b9171db07959b50c (diff)
Squashed commit of the following:
commit 9d9594ba20097dc4598f7eb42a9f9d78d73eae54 Author: Shinya Maeda <shinya@gitlab.com> Date: Thu Sep 13 20:18:31 2018 +0900 Cancel scheduled jobs commit f31c7172e07a9eb03b58c1e62eaa18cda4064aa6 Author: Shinya Maeda <shinya@gitlab.com> Date: Thu Sep 13 11:18:42 2018 +0900 Add Ci::BuildSchedule commit fb6b3ca638f40f9e1ee38b1fdd892bda4f6fede7 Author: Shinya Maeda <shinya@gitlab.com> Date: Wed Sep 12 20:02:50 2018 +0900 Scheduled jobs
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20180913102839_create_build_schedules.rb19
-rw-r--r--db/schema.rb8
2 files changed, 27 insertions, 0 deletions
diff --git a/db/migrate/20180913102839_create_build_schedules.rb b/db/migrate/20180913102839_create_build_schedules.rb
new file mode 100644
index 00000000000..1e9d9a70b0f
--- /dev/null
+++ b/db/migrate/20180913102839_create_build_schedules.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+class CreateBuildSchedules < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def change
+ create_table :ci_build_schedules, id: :bigserial do |t|
+ t.integer :build_id, null: false
+ t.datetime :execute_at, null: false
+
+ 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 b3d4badaf82..581496d78ce 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -260,6 +260,13 @@ ActiveRecord::Schema.define(version: 20180924141949) do
add_index "chat_teams", ["namespace_id"], name: "index_chat_teams_on_namespace_id", unique: true, using: :btree
+ create_table "ci_build_schedules", id: :bigserial, force: :cascade do |t|
+ t.integer "build_id", null: false
+ t.datetime "execute_at", null: false
+ end
+
+ add_index "ci_build_schedules", ["build_id"], name: "index_ci_build_schedules_on_build_id", unique: true, using: :btree
+
create_table "ci_build_trace_chunks", id: :bigserial, force: :cascade do |t|
t.integer "build_id", null: false
t.integer "chunk_index", null: false
@@ -2288,6 +2295,7 @@ ActiveRecord::Schema.define(version: 20180924141949) do
add_foreign_key "boards", "namespaces", column: "group_id", on_delete: :cascade
add_foreign_key "boards", "projects", name: "fk_f15266b5f9", on_delete: :cascade
add_foreign_key "chat_teams", "namespaces", on_delete: :cascade
+ add_foreign_key "ci_build_schedules", "ci_builds", column: "build_id", on_delete: :cascade
add_foreign_key "ci_build_trace_chunks", "ci_builds", column: "build_id", on_delete: :cascade
add_foreign_key "ci_build_trace_section_names", "projects", on_delete: :cascade
add_foreign_key "ci_build_trace_sections", "ci_build_trace_section_names", column: "section_name_id", name: "fk_264e112c66", on_delete: :cascade