Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThong Kuah <tkuah@gitlab.com>2019-06-24 00:48:16 +0300
committerThong Kuah <tkuah@gitlab.com>2019-06-27 08:28:48 +0300
commit525edec78bc39ae41284927f1866def56d21a12a (patch)
treee59fd0498b9dd9396838594a6834b0642142ae50 /db/migrate/20190623212503_add_cluster_id_to_deployments.rb
parent871d06993edba9220c10ef2ca5c64f412ee5f984 (diff)
Add cluster_id to deployments table as an FK
We nullify when cluster is deleted as we want to keep the deployment record around. Add cluster as an optional association We will have only cluster for deployments where the build deploys to a kubernetes cluster
Diffstat (limited to 'db/migrate/20190623212503_add_cluster_id_to_deployments.rb')
-rw-r--r--db/migrate/20190623212503_add_cluster_id_to_deployments.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/db/migrate/20190623212503_add_cluster_id_to_deployments.rb b/db/migrate/20190623212503_add_cluster_id_to_deployments.rb
new file mode 100644
index 00000000000..cd0c4191568
--- /dev/null
+++ b/db/migrate/20190623212503_add_cluster_id_to_deployments.rb
@@ -0,0 +1,9 @@
+# frozen_string_literal: true
+
+class AddClusterIdToDeployments < ActiveRecord::Migration[5.1]
+ DOWNTIME = false
+
+ def change
+ add_column :deployments, :cluster_id, :integer
+ end
+end