diff options
author | Shinya Maeda <shinya@gitlab.com> | 2018-04-05 00:19:28 +0900 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2018-04-05 14:14:54 +0900 |
commit | e790cc7a1d8e48f5b1bd1a02a8a5b184465b9604 (patch) | |
tree | 8abf9ce70e0097a3be853edb4bbb0903d6486dd3 /db | |
parent | 2fac77b0819fc951bb9e896d2615f8a550093707 (diff) | |
download | gitlab-ce-e790cc7a1d8e48f5b1bd1a02a8a5b184465b9604.tar.gz |
Fix migration file and schema
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20180326202229_create_ci_job_trace_chunks.rb | 4 | ||||
-rw-r--r-- | db/schema.rb | 14 |
2 files changed, 4 insertions, 14 deletions
diff --git a/db/migrate/20180326202229_create_ci_job_trace_chunks.rb b/db/migrate/20180326202229_create_ci_job_trace_chunks.rb index 70b230a7978..abfaea9f54a 100644 --- a/db/migrate/20180326202229_create_ci_job_trace_chunks.rb +++ b/db/migrate/20180326202229_create_ci_job_trace_chunks.rb @@ -4,14 +4,14 @@ class CreateCiJobTraceChunks < ActiveRecord::Migration DOWNTIME = false def change - create_table :ci_job_trace_chunks do |t| + create_table :ci_job_trace_chunks, id: :bigserial do |t| t.integer :job_id, null: false t.integer :chunk_index, null: false t.integer :data_store, null: false t.text :raw_data t.foreign_key :ci_builds, column: :job_id, on_delete: :cascade - t.index [:chunk_index, :job_id], unique: true + t.index [:job_id, :chunk_index], unique: true end end end diff --git a/db/schema.rb b/db/schema.rb index efad5bd6b1c..cf26c17d5f3 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -370,22 +370,14 @@ 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| + create_table "ci_job_trace_chunks", id: :bigserial, force: :cascade do |t| t.integer "job_id", null: false t.integer "chunk_index", null: false t.integer "data_store", null: false t.text "raw_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 + add_index "ci_job_trace_chunks", ["job_id", "chunk_index"], name: "index_ci_job_trace_chunks_on_job_id_and_chunk_index", unique: true, using: :btree create_table "ci_pipeline_schedule_variables", force: :cascade do |t| t.string "key", null: false @@ -2062,8 +2054,6 @@ ActiveRecord::Schema.define(version: 20180327101207) do 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 |