summaryrefslogtreecommitdiff
path: root/db/migrate/20160610204157_add_deployments.rb
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-06-15 13:00:13 +0200
committerKamil Trzcinski <ayufan@ayufan.eu>2016-06-15 13:00:13 +0200
commit14433b341d5e8f0e55d984b478267f5df98f42ae (patch)
tree7aeb7fbe6924066240f0e6abdee54772967d3ddf /db/migrate/20160610204157_add_deployments.rb
parenteb26755d63dbe3b4c32230a2ec8730a0d889f292 (diff)
downloadgitlab-ce-14433b341d5e8f0e55d984b478267f5df98f42ae.tar.gz
Make `project_id` and `environment_id` nullableenvironments-and-deployments
This is done to make belongs_to with required to properly validate association. Otherwise `ActiveRecord::StatementInvalid` is raised.
Diffstat (limited to 'db/migrate/20160610204157_add_deployments.rb')
-rw-r--r--db/migrate/20160610204157_add_deployments.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/db/migrate/20160610204157_add_deployments.rb b/db/migrate/20160610204157_add_deployments.rb
index cfa842daa6d..a15f6c0ea6b 100644
--- a/db/migrate/20160610204157_add_deployments.rb
+++ b/db/migrate/20160610204157_add_deployments.rb
@@ -7,8 +7,8 @@ class AddDeployments < ActiveRecord::Migration
def change
create_table :deployments, force: true do |t|
t.integer :iid, null: false
- t.integer :project_id, null: false
- t.integer :environment_id, null: false
+ t.integer :project_id
+ t.integer :environment_id
t.string :ref, null: false
t.boolean :tag, null: false
t.string :sha, null: false