Class: CreateUsers

Inherits:
Object
  • Object
show all
Defined in:
lib/generators/rails_jwt_api/templates/20211007002206_create_users.rb

Instance Method Summary collapse

Instance Method Details

#changeObject



2
3
4
5
6
7
8
9
# File 'lib/generators/rails_jwt_api/templates/20211007002206_create_users.rb', line 2

def change
  create_table :users do |t|
    t.string :email
    t.string :password_digest
    t.timestamps
  end
  add_index :users, :email, unique: true
end