diff options
author | Markus Koller <markus-koller@gmx.ch> | 2017-09-18 17:07:38 +0200 |
---|---|---|
committer | Markus Koller <markus.koller.ext@siemens.com> | 2017-11-06 10:51:50 +0100 |
commit | 1f773a8ef5a1f76166d0455c6a5e473278885c17 (patch) | |
tree | ed2d955865b49aa5d102ccb4b4f64868d4d12b77 /db/migrate | |
parent | 6902848a9c54f9eb1bfd82fe173ad0d5d62fe2d5 (diff) | |
download | gitlab-ce-1f773a8ef5a1f76166d0455c6a5e473278885c17.tar.gz |
Support custom attributes on groups
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20170918140927_create_group_custom_attributes.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/db/migrate/20170918140927_create_group_custom_attributes.rb b/db/migrate/20170918140927_create_group_custom_attributes.rb new file mode 100644 index 00000000000..3879ea15eb6 --- /dev/null +++ b/db/migrate/20170918140927_create_group_custom_attributes.rb @@ -0,0 +1,19 @@ +class CreateGroupCustomAttributes < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + def change + create_table :group_custom_attributes do |t| + t.timestamps_with_timezone null: false + t.references :group, null: false + t.string :key, null: false + t.string :value, null: false + + t.index [:group_id, :key], unique: true + t.index [:key, :value] + end + + add_foreign_key :group_custom_attributes, :namespaces, column: :group_id, on_delete: :cascade # rubocop: disable Migration/AddConcurrentForeignKey + end +end |