diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-09-19 12:04:38 -0300 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-10-19 14:57:14 -0200 |
commit | d820c090ec85f8118e4cea75bd63d800e812ea25 (patch) | |
tree | 63ab9b40c13f1a44add19cad9d40f4c58f7f31c8 /db/migrate | |
parent | d927336403a92d340d7e5b2d2328c5a0e029d666 (diff) | |
download | gitlab-ce-d820c090ec85f8118e4cea75bd63d800e812ea25.tar.gz |
Add GroupLabel model
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20160919144305_add_type_to_labels.rb | 9 | ||||
-rw-r--r-- | db/migrate/20160919145149_add_group_id_to_labels.rb | 13 |
2 files changed, 22 insertions, 0 deletions
diff --git a/db/migrate/20160919144305_add_type_to_labels.rb b/db/migrate/20160919144305_add_type_to_labels.rb new file mode 100644 index 00000000000..43aac7846d3 --- /dev/null +++ b/db/migrate/20160919144305_add_type_to_labels.rb @@ -0,0 +1,9 @@ +class AddTypeToLabels < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + def change + add_column :labels, :type, :string + end +end diff --git a/db/migrate/20160919145149_add_group_id_to_labels.rb b/db/migrate/20160919145149_add_group_id_to_labels.rb new file mode 100644 index 00000000000..05e21af0584 --- /dev/null +++ b/db/migrate/20160919145149_add_group_id_to_labels.rb @@ -0,0 +1,13 @@ +class AddGroupIdToLabels < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def change + add_column :labels, :group_id, :integer + add_foreign_key :labels, :namespaces, column: :group_id, on_delete: :cascade + add_concurrent_index :labels, :group_id + end +end |