created user model

This commit is contained in:
2024-08-07 16:59:14 +02:00
parent f3b67b0800
commit ffc09cabc4
5 changed files with 23 additions and 1 deletions

View File

@@ -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

View File

@@ -0,0 +1,5 @@
class AddUserReferenceToArticles < ActiveRecord::Migration[7.1]
def change
add_reference :articles, :user, foreign_key: true
end
end