Add session & user management in the backend
This commit is contained in:
parent
9aee9adfce
commit
372fe53947
12 changed files with 88 additions and 11 deletions
12
db/migrate/20250508115812_create_users.rb
Normal file
12
db/migrate/20250508115812_create_users.rb
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
class CreateUsers < ActiveRecord::Migration[8.0]
|
||||
def change
|
||||
create_table :users do |t|
|
||||
t.string :name
|
||||
t.string :status
|
||||
t.string :email
|
||||
t.string :password_digest
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
5
db/migrate/20250508131043_drop_notes_table.rb
Normal file
5
db/migrate/20250508131043_drop_notes_table.rb
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
class DropNotesTable < ActiveRecord::Migration[8.0]
|
||||
def change
|
||||
drop_table :notes
|
||||
end
|
||||
end
|
||||
10
db/schema.rb
generated
10
db/schema.rb
generated
|
|
@ -10,7 +10,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[8.0].define(version: 2025_05_07_082751) do
|
||||
ActiveRecord::Schema[8.0].define(version: 2025_05_08_131043) do
|
||||
create_table "active_storage_attachments", force: :cascade do |t|
|
||||
t.string "name", null: false
|
||||
t.string "record_type", null: false
|
||||
|
|
@ -45,9 +45,11 @@ ActiveRecord::Schema[8.0].define(version: 2025_05_07_082751) do
|
|||
t.datetime "updated_at", null: false
|
||||
end
|
||||
|
||||
create_table "notes", force: :cascade do |t|
|
||||
t.string "title"
|
||||
t.text "body"
|
||||
create_table "users", force: :cascade do |t|
|
||||
t.string "name"
|
||||
t.string "status"
|
||||
t.string "email"
|
||||
t.string "password_digest"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue