class CreateGuests < ActiveRecord::Migration[6.0] def change create_table :guests do |t| ## Required t.string :provider, null: false, default: 'email' t.string :uid, null: false, default: '' ## Database authenticatable t.string :encrypted_password, null: false, default: '' ## Recoverable t.string :reset_password_token t.datetime :reset_password_sent_at t.boolean :allow_password_change, default: false ## Confirmable t.string :confirmation_token t.datetime :confirmed_at t.datetime :confirmation_sent_at t.string :unconfirmed_email # Only if using reconfirmable ## User Info t.string :email ## Tokens t.text :tokens t.timestamps end add_index :guests, :email, unique: true add_index :guests, [:uid, :provider], unique: true add_index :guests, :reset_password_token, unique: true add_index :guests, :confirmation_token, unique: true end end