summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorTimothy Andrew <mail@timothyandrew.net>2017-02-07 12:13:24 +0530
committerTimothy Andrew <mail@timothyandrew.net>2017-02-24 16:50:20 +0530
commit3bd2a98f64a12a2e23a6b9ce77427a9c2033a6bf (patch)
tree2c80880b9d024bbcdaa4402a7a74f8d62207434d /db
parent8f01644ff4d25285475cbf053b140292ac50f225 (diff)
downloadgitlab-ce-3bd2a98f64a12a2e23a6b9ce77427a9c2033a6bf.tar.gz
Remove the default value for the `users.ghost` database column.
The default (false) is not strictly required, and this lets us avoid a potentially expensive migration
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20170206115204_add_column_ghost_to_users.rb6
-rw-r--r--db/schema.rb4
2 files changed, 3 insertions, 7 deletions
diff --git a/db/migrate/20170206115204_add_column_ghost_to_users.rb b/db/migrate/20170206115204_add_column_ghost_to_users.rb
index 57b66ca91a8..cc1eeda1160 100644
--- a/db/migrate/20170206115204_add_column_ghost_to_users.rb
+++ b/db/migrate/20170206115204_add_column_ghost_to_users.rb
@@ -1,12 +1,8 @@
class AddColumnGhostToUsers < ActiveRecord::Migration
- include Gitlab::Database::MigrationHelpers
-
DOWNTIME = false
- disable_ddl_transaction!
-
def up
- add_column_with_default :users, :ghost, :boolean, default: false, allow_null: false
+ add_column :users, :ghost, :boolean
end
def down
diff --git a/db/schema.rb b/db/schema.rb
index c50d6fc4ad6..1d94368f66e 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -1278,11 +1278,11 @@ ActiveRecord::Schema.define(version: 20170216141440) do
t.datetime "otp_grace_period_started_at"
t.boolean "ldap_email", default: false, null: false
t.boolean "external", default: false
- t.string "organization"
t.string "incoming_email_token"
+ t.string "organization"
t.boolean "authorized_projects_populated"
t.boolean "notified_of_own_activity", default: false, null: false
- t.boolean "ghost", default: false, null: false
+ t.boolean "ghost"
end
add_index "users", ["admin"], name: "index_users_on_admin", using: :btree