diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-08 15:09:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-08 15:09:42 +0300 |
commit | 403678e00406edc8094f087ec70e00aa29e49bef (patch) | |
tree | 447d6d4967e9a11895683b27e637a50bd9fc0602 /db/migrate | |
parent | f5050253469fc0961c02deec0e698ad62bdd9de5 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20200331132103_add_project_compliance_framework_settings_table.rb | 22 | ||||
-rw-r--r-- | db/migrate/20200401211005_create_operations_user_lists.rb | 18 |
2 files changed, 40 insertions, 0 deletions
diff --git a/db/migrate/20200331132103_add_project_compliance_framework_settings_table.rb b/db/migrate/20200331132103_add_project_compliance_framework_settings_table.rb new file mode 100644 index 00000000000..6af8c6db939 --- /dev/null +++ b/db/migrate/20200331132103_add_project_compliance_framework_settings_table.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +class AddProjectComplianceFrameworkSettingsTable < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + def up + with_lock_retries do + create_table :project_compliance_framework_settings, id: false do |t| + t.references :project, primary_key: true, null: false, index: true, foreign_key: { on_delete: :cascade } + t.integer :framework, null: false, limit: 2 + end + end + end + + def down + with_lock_retries do + drop_table :project_compliance_framework_settings + end + end +end diff --git a/db/migrate/20200401211005_create_operations_user_lists.rb b/db/migrate/20200401211005_create_operations_user_lists.rb new file mode 100644 index 00000000000..c5b928b8350 --- /dev/null +++ b/db/migrate/20200401211005_create_operations_user_lists.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +class CreateOperationsUserLists < ActiveRecord::Migration[6.0] + DOWNTIME = false + + def change + create_table :operations_user_lists do |t| + t.references :project, index: false, foreign_key: { on_delete: :cascade }, null: false + t.timestamps_with_timezone + t.integer :iid, null: false + t.string :name, null: false, limit: 255 + t.text :user_xids, null: false, default: '' + + t.index [:project_id, :iid], unique: true + t.index [:project_id, :name], unique: true + end + end +end |