Make user.email nullable in the db

This commit is contained in:
kikito
2015-10-19 20:09:38 +02:00
parent 9cc158540e
commit 5cdf298738
2 changed files with 7 additions and 2 deletions

View File

@@ -0,0 +1,5 @@
class RemoveUserConstraints < ActiveRecord::Migration
def change
change_column(:users, :email, :string, null: true, unique: true)
end
end

View File

@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20151016110703) do
ActiveRecord::Schema.define(version: 20151019133719) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -267,7 +267,7 @@ ActiveRecord::Schema.define(version: 20151016110703) do
add_index "tags", ["proposals_count"], name: "index_tags_on_proposals_count", using: :btree
create_table "users", force: :cascade do |t|
t.string "email", default: "", null: false
t.string "email", default: ""
t.string "encrypted_password", default: "", null: false
t.string "reset_password_token"
t.datetime "reset_password_sent_at"