diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-06-15 12:03:49 +0200 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-06-15 12:03:49 +0200 |
commit | 2541e50d7ce64bb402d06dc9d75567b78282c7b7 (patch) | |
tree | ab2fc7f250cc10631da0ffb9b5bd6f2d50ca4974 /db | |
parent | 14a02a6a95353948d00f8f973b35b80ac06f4599 (diff) | |
download | gitlab-ce-2541e50d7ce64bb402d06dc9d75567b78282c7b7.tar.gz |
Improve validations
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20160610204157_add_deployments.rb | 12 | ||||
-rw-r--r-- | db/migrate/20160610204158_add_environments.rb | 2 | ||||
-rw-r--r-- | db/schema.rb | 40 |
3 files changed, 27 insertions, 27 deletions
diff --git a/db/migrate/20160610204157_add_deployments.rb b/db/migrate/20160610204157_add_deployments.rb index 557b78f91e1..cfa842daa6d 100644 --- a/db/migrate/20160610204157_add_deployments.rb +++ b/db/migrate/20160610204157_add_deployments.rb @@ -6,12 +6,12 @@ class AddDeployments < ActiveRecord::Migration def change create_table :deployments, force: true do |t| - t.integer :iid - t.integer :project_id - t.integer :environment_id - t.string :ref - t.boolean :tag - t.string :sha + t.integer :iid, null: false + t.integer :project_id, null: false + t.integer :environment_id, null: false + t.string :ref, null: false + t.boolean :tag, null: false + t.string :sha, null: false t.integer :user_id t.integer :deployable_id t.string :deployable_type diff --git a/db/migrate/20160610204158_add_environments.rb b/db/migrate/20160610204158_add_environments.rb index 8311fd39b01..e1c71d173c4 100644 --- a/db/migrate/20160610204158_add_environments.rb +++ b/db/migrate/20160610204158_add_environments.rb @@ -6,7 +6,7 @@ class AddEnvironments < ActiveRecord::Migration def change create_table :environments, force: true do |t| - t.integer :project_id + t.integer :project_id, null: false t.string :name, null: false t.datetime :created_at t.datetime :updated_at diff --git a/db/schema.rb b/db/schema.rb index 388b259277a..3ac64e888ee 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -384,12 +384,12 @@ ActiveRecord::Schema.define(version: 20160610301627) do add_index "deploy_keys_projects", ["project_id"], name: "index_deploy_keys_projects_on_project_id", using: :btree create_table "deployments", force: :cascade do |t| - t.integer "iid" - t.integer "project_id" - t.integer "environment_id" - t.string "ref" - t.boolean "tag" - t.string "sha" + t.integer "iid", null: false + t.integer "project_id", null: false + t.integer "environment_id", null: false + t.string "ref", null: false + t.boolean "tag", null: false + t.string "sha", null: false t.integer "user_id" t.integer "deployable_id" t.string "deployable_type" @@ -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" + t.integer "project_id", null: false t.string "name", null: false t.datetime "created_at" t.datetime "updated_at" @@ -777,37 +777,37 @@ ActiveRecord::Schema.define(version: 20160610301627) do t.datetime "created_at" t.datetime "updated_at" t.integer "creator_id" - t.boolean "issues_enabled", default: true, null: false - t.boolean "merge_requests_enabled", default: true, null: false - t.boolean "wiki_enabled", default: true, null: false + t.boolean "issues_enabled", default: true, null: false + t.boolean "merge_requests_enabled", default: true, null: false + t.boolean "wiki_enabled", default: true, null: false t.integer "namespace_id" - t.boolean "snippets_enabled", default: true, null: false + t.boolean "snippets_enabled", default: true, null: false t.datetime "last_activity_at" t.string "import_url" - t.integer "visibility_level", default: 0, null: false - t.boolean "archived", default: false, null: false + t.integer "visibility_level", default: 0, null: false + t.boolean "archived", default: false, null: false t.string "avatar" t.string "import_status" t.float "repository_size", default: 0.0 - t.integer "star_count", default: 0, null: false + t.integer "star_count", default: 0, null: false t.string "import_type" t.string "import_source" t.integer "commit_count", default: 0 t.text "import_error" t.integer "ci_id" - t.boolean "builds_enabled", default: true, null: false - t.boolean "shared_runners_enabled", default: true, null: false + t.boolean "builds_enabled", default: true, null: false + t.boolean "shared_runners_enabled", default: true, null: false t.string "runners_token" t.string "build_coverage_regex" - t.boolean "build_allow_git_fetch", default: true, null: false - t.integer "build_timeout", default: 3600, null: false + t.boolean "build_allow_git_fetch", default: true, null: false + t.integer "build_timeout", default: 3600, null: false t.boolean "pending_delete", default: false - t.boolean "public_builds", default: true, null: false + t.boolean "public_builds", default: true, null: false t.integer "pushes_since_gc", default: 0 t.boolean "last_repository_check_failed" t.datetime "last_repository_check_at" t.boolean "container_registry_enabled" - t.boolean "only_allow_merge_if_build_succeeds", default: false, null: false + t.boolean "only_allow_merge_if_build_succeeds", default: false, null: false t.boolean "has_external_issue_tracker" end |