summaryrefslogtreecommitdiff
path: root/db/migrate
diff options
context:
space:
mode:
authorZeger-Jan van de Weg <zegerjan@gitlab.com>2017-03-06 14:04:14 +0000
committerZeger-Jan van de Weg <zegerjan@gitlab.com>2017-03-06 14:04:14 +0000
commit77d0de9102e8956f805cd7c52a48684d0b621dc7 (patch)
tree9404860b1959caffaf8f2539a18853547b30e1a5 /db/migrate
parent597639c09662b5f43ff966938c5e55e485a1563c (diff)
parent348dff0a826c45f00f992e761423a22d2ac32bc3 (diff)
downloadgitlab-ce-77d0de9102e8956f805cd7c52a48684d0b621dc7.tar.gz
Merge branch 'master' into 'zj-create-mattermost-team'
# Conflicts: # db/schema.rb
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20170217151948_add_owner_id_to_triggers.rb9
-rw-r--r--db/migrate/20170217151949_add_description_to_triggers.rb9
-rw-r--r--db/migrate/20170305203726_add_owner_id_foreign_key.rb11
3 files changed, 29 insertions, 0 deletions
diff --git a/db/migrate/20170217151948_add_owner_id_to_triggers.rb b/db/migrate/20170217151948_add_owner_id_to_triggers.rb
new file mode 100644
index 00000000000..16d7cc5bed6
--- /dev/null
+++ b/db/migrate/20170217151948_add_owner_id_to_triggers.rb
@@ -0,0 +1,9 @@
+class AddOwnerIdToTriggers < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ def change
+ add_column :ci_triggers, :owner_id, :integer
+ end
+end
diff --git a/db/migrate/20170217151949_add_description_to_triggers.rb b/db/migrate/20170217151949_add_description_to_triggers.rb
new file mode 100644
index 00000000000..1dca0e37412
--- /dev/null
+++ b/db/migrate/20170217151949_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
diff --git a/db/migrate/20170305203726_add_owner_id_foreign_key.rb b/db/migrate/20170305203726_add_owner_id_foreign_key.rb
new file mode 100644
index 00000000000..3eece0e2eb5
--- /dev/null
+++ b/db/migrate/20170305203726_add_owner_id_foreign_key.rb
@@ -0,0 +1,11 @@
+class AddOwnerIdForeignKey < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def change
+ add_concurrent_foreign_key :ci_triggers, :users, column: :owner_id, on_delete: :cascade
+ end
+end