実現したいこと
スキーマファイルに、DeviseCreateCustomersのマイグレーションファイルで記述したカラムを反映させたい
発生している問題・エラーメッセージ
railsでWebサイトを作成しております。
deviseをインストールし、DeviseCreateCustomersのマイグレーションファイルに
カラムを記述したのですがエラーが出たので調べると、スキーマファイルにDeviseCreateCustomersに記述したカラムが反映されていませんでした。
エラーメッセージ
Rails6.1.7
Ruby3.1.2
ソースコード
class
1 def change 2 create_table :customers do |t| 3 ## Database authenticatable 4 t.string :email, null: false, default: "" 5 t.string :encrypted_password, null: false, default: "" 6 7 ## Recoverable 8 t.string :reset_password_token 9 t.datetime :reset_password_sent_at 10 11 ## Rememberable 12 t.datetime :remember_created_at 13 14 ## Trackable 15 # t.integer :sign_in_count, default: 0, null: false 16 # t.datetime :current_sign_in_at 17 # t.datetime :last_sign_in_at 18 # t.string :current_sign_in_ip 19 # t.string :last_sign_in_ip 20 21 ## Confirmable 22 # t.string :confirmation_token 23 # t.datetime :confirmed_at 24 # t.datetime :confirmation_sent_at 25 # t.string :unconfirmed_email # Only if using reconfirmable 26 27 ## Lockable 28 # t.integer :failed_attempts, default: 0, null: false # Only if lock strategy is :failed_attempts 29 # t.string :unlock_token # Only if unlock strategy is :email or :both 30 # t.datetime :locked_at 31 32 t.string :first_name, null: false 33 t.string :last_name, null: false 34 t.string :first_name_kana, null: false 35 t.string :last_name_kana, null: false 36 t.string :postal_code, null: false 37 t.string :address, null: false 38 t.string :telephone_number, null: false 39 t.boolean :is_active, null: false, default: true 40 t.timestamps null: false 41 end 42 43 add_index :customers, :email, unique: true 44 add_index :customers, :reset_password_token, unique: true 45 # add_index :customers, :confirmation_token, unique: true 46 # add_index :customers, :unlock_token, unique: true 47 end 48end
試したこと
ロールバック
こちらがスキーマファイルの該当箇所になります。
初めての質問で至らぬ箇所があるかと思いますがよろしくお願いします。