summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2018-03-26 20:45:18 +0900
committerShinya Maeda <shinya@gitlab.com>2018-04-05 14:14:53 +0900
commitaccc2cab20cb1546605f05aa68545d2d55c1f522 (patch)
treee4e675051e045864b4ea682a7343f31a5ea40212 /db
parentd4400e6b5c172916eb6dded8ebb04b8b650f493f (diff)
downloadgitlab-ce-accc2cab20cb1546605f05aa68545d2d55c1f522.tar.gz
Add ci_job_trace_chunks table
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20180326202229_create_ci_job_trace_chunks.rb16
-rw-r--r--db/schema.rb19
2 files changed, 35 insertions, 0 deletions
diff --git a/db/migrate/20180326202229_create_ci_job_trace_chunks.rb b/db/migrate/20180326202229_create_ci_job_trace_chunks.rb
new file mode 100644
index 00000000000..f7548cd766e
--- /dev/null
+++ b/db/migrate/20180326202229_create_ci_job_trace_chunks.rb
@@ -0,0 +1,16 @@
+class CreateCiJobTraceChunks < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ def change
+ create_table :ci_job_trace_chunks do |t|
+ t.integer :job_id, null: false
+ t.integer :chunk_index, null: false
+ t.text :data
+
+ t.foreign_key :ci_builds, column: :job_id, on_delete: :cascade
+ t.index [:chunk_index, :job_id], unique: true
+ end
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 06fc1a9d7e9..54346dadad2 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -370,6 +370,22 @@ ActiveRecord::Schema.define(version: 20180327101207) do
add_index "ci_job_artifacts", ["job_id", "file_type"], name: "index_ci_job_artifacts_on_job_id_and_file_type", unique: true, using: :btree
add_index "ci_job_artifacts", ["project_id"], name: "index_ci_job_artifacts_on_project_id", using: :btree
+ create_table "ci_job_trace_chunks", force: :cascade do |t|
+ t.integer "job_id", null: false
+ t.integer "chunk_index", null: false
+ t.text "data"
+ end
+
+ add_index "ci_job_trace_chunks", ["chunk_index", "job_id"], name: "index_ci_job_trace_chunks_on_chunk_index_and_job_id", unique: true, using: :btree
+
+ create_table "ci_pipeline_chat_data", id: :bigserial, force: :cascade do |t|
+ t.integer "pipeline_id", null: false
+ t.integer "chat_name_id", null: false
+ t.text "response_url", null: false
+ end
+
+ add_index "ci_pipeline_chat_data", ["pipeline_id"], name: "index_ci_pipeline_chat_data_on_pipeline_id", unique: true, using: :btree
+
create_table "ci_pipeline_schedule_variables", force: :cascade do |t|
t.string "key", null: false
t.text "value"
@@ -2044,6 +2060,9 @@ ActiveRecord::Schema.define(version: 20180327101207) do
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
+ add_foreign_key "ci_job_trace_chunks", "ci_builds", column: "job_id", on_delete: :cascade
+ add_foreign_key "ci_pipeline_chat_data", "chat_names", on_delete: :cascade
+ add_foreign_key "ci_pipeline_chat_data", "ci_pipelines", column: "pipeline_id", on_delete: :cascade
add_foreign_key "ci_pipeline_schedule_variables", "ci_pipeline_schedules", column: "pipeline_schedule_id", name: "fk_41c35fda51", on_delete: :cascade
add_foreign_key "ci_pipeline_schedules", "projects", name: "fk_8ead60fcc4", on_delete: :cascade
add_foreign_key "ci_pipeline_schedules", "users", column: "owner_id", name: "fk_9ea99f58d2", on_delete: :nullify