前提・実現したいこと
デプロイ中のエラーでbundle exec rake db:migrate RAILS_ENV=productionを実行させたいです。
発生している問題・エラーメッセージ
-- create_table(:users, {:options=>"ENGINE=InnoDB ROW_FORMAT=DYNAMIC"}) rake aborted! StandardError: An error has occurred, all later migrations canceled: Mysql2::Error: Invalid default value for 'type_of_account': CREATE TABLE `users`
schema
create_table "users", force: :cascade do |t| t.string "email", default: "", null: false t.string "encrypted_password", default: "", null: false t.string "reset_password_token" t.datetime "reset_password_sent_at" t.datetime "remember_created_at" t.integer "sign_in_count", default: 0, null: false t.datetime "current_sign_in_at" t.datetime "last_sign_in_at" t.string "current_sign_in_ip" t.string "last_sign_in_ip" t.string "nickname" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.string "last_name" t.string "last_name_kana" t.string "first_name" t.string "first_name_kana" t.string "profile_image_id" t.string "introduction" t.string "state" t.string "city" t.string "street" t.string "zip" t.string "phone_number1" t.string "phone_number2" t.string "phone_number3" t.string "image_id" t.string "twitter_id" t.string "facebook_id" t.string "instagram_id" t.datetime "deleted_at" t.integer "point", default: 0 t.string "financial_institution_name" t.string "branch_name" t.string "type_of_account", default: "普通口座" t.integer "account_number" t.string "account_holder_name" t.index ["email"], name: "index_users_on_email", unique: true t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true end
エラーに対して
Invalid default value for 'type_of_account':と出ているためデフォルトの設定の仕方が悪いのでしょうか?
###よろしくお願いします。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。