summaryrefslogtreecommitdiff
path: root/db/migrate
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2017-02-15 19:36:31 +0100
committerKamil Trzcinski <ayufan@ayufan.eu>2017-03-05 18:52:41 +0100
commit0a75de2909152351483b317024fcab2e9bb08e16 (patch)
tree3284b4be0e3121e0dc1db62e2bf85435c1d96654 /db/migrate
parentc33f09d2549d2228a5ac7ceb7cb099774fbd826e (diff)
downloadgitlab-ce-0a75de2909152351483b317024fcab2e9bb08e16.tar.gz
Make Pipeline Triggers to be user aware
- they can have owner, - they can be edited, - they have description, - you can take ownership of them
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20170215164610_add_owner_id_to_triggers.rb10
-rw-r--r--db/migrate/20170215165036_add_description_to_triggers.rb9
2 files changed, 19 insertions, 0 deletions
diff --git a/db/migrate/20170215164610_add_owner_id_to_triggers.rb b/db/migrate/20170215164610_add_owner_id_to_triggers.rb
new file mode 100644
index 00000000000..02c77ee4b5e
--- /dev/null
+++ b/db/migrate/20170215164610_add_owner_id_to_triggers.rb
@@ -0,0 +1,10 @@
+class AddOwnerIdToTriggers < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ def change
+ add_column :ci_triggers, :owner_id, :integer
+ add_foreign_key :ci_triggers, :users, column: :owner_id, on_delete: :nullify
+ end
+end
diff --git a/db/migrate/20170215165036_add_description_to_triggers.rb b/db/migrate/20170215165036_add_description_to_triggers.rb
new file mode 100644
index 00000000000..1dca0e37412
--- /dev/null
+++ b/db/migrate/20170215165036_add_description_to_triggers.rb
@@ -0,0 +1,9 @@
+class AddDescriptionToTriggers < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ def change
+ add_column :ci_triggers, :description, :string
+ end
+end