Migrate to Postgresql for better network handling. Add more user functionality.
This commit is contained in:
13
db/migrate/002_create_users.rb
Normal file
13
db/migrate/002_create_users.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class CreateUsers < ActiveRecord::Migration[8.1]
|
||||
def change
|
||||
create_table :users, force: :cascade do |t|
|
||||
t.string :email_address, null: false, index: { unique: true }
|
||||
t.string :password_digest, null: false
|
||||
t.integer :role, default: 1, null: false # 1=admin, 2=user
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user