diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-16 18:07:39 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-16 18:07:39 +0300 |
commit | 862d225ca0d8eb452e56b8fe5a0109aac796e872 (patch) | |
tree | ebf0a5d43bd271fadd9004245fb7c7cf0543dcc1 /db | |
parent | d10a462fedbd7794a83abdba9b4526600f71de5b (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20191108031900_create_package_build_info.rb | 12 | ||||
-rw-r--r-- | db/schema.rb | 9 |
2 files changed, 21 insertions, 0 deletions
diff --git a/db/migrate/20191108031900_create_package_build_info.rb b/db/migrate/20191108031900_create_package_build_info.rb new file mode 100644 index 00000000000..d0c85e2fb3f --- /dev/null +++ b/db/migrate/20191108031900_create_package_build_info.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +class CreatePackageBuildInfo < ActiveRecord::Migration[5.2] + DOWNTIME = false + + def change + create_table :packages_build_infos do |t| + t.references :package, null: false, foreign_key: { to_table: :packages_packages, on_delete: :cascade }, type: :integer, index: { unique: true } + t.references :pipeline, index: true, null: true, foreign_key: { to_table: :ci_pipelines, on_delete: :nullify }, type: :integer + end + end +end diff --git a/db/schema.rb b/db/schema.rb index bfb6f55bbd4..88c824cb708 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -2846,6 +2846,13 @@ ActiveRecord::Schema.define(version: 2019_12_08_071112) do t.index ["project_id", "token_encrypted"], name: "index_feature_flags_clients_on_project_id_and_token_encrypted", unique: true end + create_table "packages_build_infos", force: :cascade do |t| + t.integer "package_id", null: false + t.integer "pipeline_id" + t.index ["package_id"], name: "index_packages_build_infos_on_package_id", unique: true + t.index ["pipeline_id"], name: "index_packages_build_infos_on_pipeline_id" + end + create_table "packages_conan_file_metadata", force: :cascade do |t| t.bigint "package_file_id", null: false t.datetime_with_timezone "created_at", null: false @@ -4644,6 +4651,8 @@ ActiveRecord::Schema.define(version: 2019_12_08_071112) do add_foreign_key "operations_feature_flag_scopes", "operations_feature_flags", column: "feature_flag_id", on_delete: :cascade add_foreign_key "operations_feature_flags", "projects", on_delete: :cascade add_foreign_key "operations_feature_flags_clients", "projects", on_delete: :cascade + add_foreign_key "packages_build_infos", "ci_pipelines", column: "pipeline_id", on_delete: :nullify + add_foreign_key "packages_build_infos", "packages_packages", column: "package_id", on_delete: :cascade add_foreign_key "packages_conan_file_metadata", "packages_package_files", column: "package_file_id", on_delete: :cascade add_foreign_key "packages_conan_metadata", "packages_packages", column: "package_id", on_delete: :cascade add_foreign_key "packages_dependency_links", "packages_dependencies", column: "dependency_id", on_delete: :cascade |