Class: CreateUsers
- Inherits:
-
Object
- Object
- CreateUsers
- Defined in:
- lib/db/create_users.rb
Overview
WARNING: This migration is a prerequisite for the inbuild JWT authentification logic Please make sure you executed it before using AuthTokenable module
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/db/create_users.rb', line 4 def call return if Rubee::SequelObject::DB.tables.include?(:users) Rubee::SequelObject::DB.create_table(:users) do primary_key(:id) String(:email) String(:password) index(:email) # timestamps datetime(:created) datetime(:updated) end User.create(email: 'ok@ok.com', password: 'password') end |