summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-05 09:07:27 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-05 09:07:27 +0000
commit8f764d21b0011056e1492d92afe3bd40b847b9f7 (patch)
treec1b5bc3eed8ac4d4b458466a9e4a548d94f389d9 /db
parentf7ead77657cd7dc539319624301c22bf91b986e4 (diff)
downloadgitlab-ce-8f764d21b0011056e1492d92afe3bd40b847b9f7.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20191119220425_rename_software_license_policies_approval_status_to_classification.rb17
-rw-r--r--db/post_migrate/20191119221041_cleanup_software_license_policies_classification_rename.rb17
-rw-r--r--db/schema.rb2
3 files changed, 35 insertions, 1 deletions
diff --git a/db/migrate/20191119220425_rename_software_license_policies_approval_status_to_classification.rb b/db/migrate/20191119220425_rename_software_license_policies_approval_status_to_classification.rb
new file mode 100644
index 00000000000..98c14f42558
--- /dev/null
+++ b/db/migrate/20191119220425_rename_software_license_policies_approval_status_to_classification.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class RenameSoftwareLicensePoliciesApprovalStatusToClassification < ActiveRecord::Migration[5.2]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def up
+ rename_column_concurrently :software_license_policies, :approval_status, :classification
+ end
+
+ def down
+ undo_rename_column_concurrently :software_license_policies, :approval_status, :classification
+ end
+end
diff --git a/db/post_migrate/20191119221041_cleanup_software_license_policies_classification_rename.rb b/db/post_migrate/20191119221041_cleanup_software_license_policies_classification_rename.rb
new file mode 100644
index 00000000000..eb605dce5aa
--- /dev/null
+++ b/db/post_migrate/20191119221041_cleanup_software_license_policies_classification_rename.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class CleanupSoftwareLicensePoliciesClassificationRename < ActiveRecord::Migration[5.2]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def up
+ cleanup_concurrent_column_rename :software_license_policies, :approval_status, :classification
+ end
+
+ def down
+ undo_cleanup_concurrent_column_rename :software_license_policies, :approval_status, :classification
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 3bdf41e609f..c33223f8b59 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -3673,7 +3673,7 @@ ActiveRecord::Schema.define(version: 2019_12_02_031812) do
create_table "software_license_policies", id: :serial, force: :cascade do |t|
t.integer "project_id", null: false
t.integer "software_license_id", null: false
- t.integer "approval_status", default: 0, null: false
+ t.integer "classification", default: 0, null: false
t.index ["project_id", "software_license_id"], name: "index_software_license_policies_unique_per_project", unique: true
t.index ["software_license_id"], name: "index_software_license_policies_on_software_license_id"
end