add user model

This commit is contained in:
João Geonizeli
2021-08-04 20:32:58 -03:00
parent a90855c5af
commit 41e3119953
10 changed files with 156 additions and 8 deletions

View File

@@ -0,0 +1,14 @@
# frozen_string_literal: true
class CreateUsers < ActiveRecord::Migration[6.1]
def change
create_table(:users) do |t|
t.string(:first_name, null: false)
t.string(:last_name, null: false)
t.string(:email, null: false)
t.timestamps
end
add_index(:users, :email, unique: true)
end
end