diff options
-rw-r--r-- | db/migrate/20160610204157_add_deployments.rb | 4 | ||||
-rw-r--r-- | db/schema.rb | 6 | ||||
-rw-r--r-- | spec/services/create_deployment_service_spec.rb | 2 |
3 files changed, 7 insertions, 5 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 diff --git a/db/schema.rb b/db/schema.rb index 3ac64e888ee..1e8d86d0aae 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -385,8 +385,8 @@ ActiveRecord::Schema.define(version: 20160610301627) do create_table "deployments", force: :cascade 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 @@ -413,7 +413,7 @@ ActiveRecord::Schema.define(version: 20160610301627) do add_index "emails", ["user_id"], name: "index_emails_on_user_id", using: :btree create_table "environments", force: :cascade do |t| - t.integer "project_id", null: false + t.integer "project_id" t.string "name", null: false t.datetime "created_at" t.datetime "updated_at" diff --git a/spec/services/create_deployment_service_spec.rb b/spec/services/create_deployment_service_spec.rb index b6ae3505379..654e441f3cd 100644 --- a/spec/services/create_deployment_service_spec.rb +++ b/spec/services/create_deployment_service_spec.rb @@ -10,6 +10,7 @@ describe CreateDeploymentService, services: true do let(:params) do { environment: 'production', ref: 'master', + tag: false, sha: '97de212e80737a608d939f648d959671fb0a0142', } end @@ -42,6 +43,7 @@ describe CreateDeploymentService, services: true do let(:params) do { environment: 'name with spaces', ref: 'master', + tag: false, sha: '97de212e80737a608d939f648d959671fb0a0142', } end |