created user model
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
class CreateUsers < ActiveRecord::Migration[7.1]
|
||||
def change
|
||||
create_table :users do |t|
|
||||
t.string :username
|
||||
t.string :email
|
||||
t.string :password_digest
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
|
@@ -0,0 +1,5 @@
|
||||
class AddUserReferenceToArticles < ActiveRecord::Migration[7.1]
|
||||
def change
|
||||
add_reference :articles, :user, foreign_key: true
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user