Create model for users with email and password
This commit is contained in:
parent
d6500e013d
commit
6682c8c300
6 changed files with 72 additions and 14 deletions
9
db/migrate/20250321234644_create_users.rb
Normal file
9
db/migrate/20250321234644_create_users.rb
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
class CreateUsers < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
create_table :users do |t|
|
||||
t.string :email
|
||||
t.string :password
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[7.2].define(version: 2025_03_21_224552) do
|
||||
ActiveRecord::Schema[7.2].define(version: 2025_03_21_234644) do
|
||||
create_table "candidates", force: :cascade do |t|
|
||||
t.integer "vote_id"
|
||||
t.string "name"
|
||||
|
|
@ -20,6 +20,13 @@ ActiveRecord::Schema[7.2].define(version: 2025_03_21_224552) do
|
|||
t.index ["vote_id"], name: "index_candidates_on_vote_id"
|
||||
end
|
||||
|
||||
create_table "users", force: :cascade do |t|
|
||||
t.string "email"
|
||||
t.string "password"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
end
|
||||
|
||||
create_table "votes", force: :cascade do |t|
|
||||
t.string "secure_id"
|
||||
t.string "title"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue