14 lines
271 B
Ruby
14 lines
271 B
Ruby
|
|
class CreateUsers < ActiveRecord::Migration[8.0]
|
||
|
|
def change
|
||
|
|
create_table :users do |t|
|
||
|
|
t.string :email
|
||
|
|
t.string :name
|
||
|
|
t.string :password_digest
|
||
|
|
t.integer :role
|
||
|
|
|
||
|
|
t.timestamps
|
||
|
|
end
|
||
|
|
add_index :users, :email, unique: true
|
||
|
|
end
|
||
|
|
end
|