Skip to content

Commit

Permalink
update users table with email_verified
Browse files Browse the repository at this point in the history
  • Loading branch information
juancwu committed Dec 3, 2024
1 parent 9c131fd commit 5a12ea0
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
-- +goose Up
-- +goose StatementBegin

-- by default, goose runs in transactions

ALTER TABLE users ADD COLUMN email_verified BOOLEAN NOT NULL DEFAULT false;

-- +goose StatementEnd

-- +goose Down
-- +goose StatementBegin

ALTER TABLE users DROP COLUMN email_verified;

-- +goose StatementEnd
6 changes: 2 additions & 4 deletions backend/.sqlc/queries/users.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
INSERT INTO users (
email,
password_hash,
first_name,
last_name,
role
) VALUES (
$1, $2, $3, $4, $5
$1, $2, $3
) RETURNING *;

-- name: GetUserByEmail :one
Expand All @@ -15,4 +13,4 @@ WHERE email = $1 LIMIT 1;

-- name: GetUserByID :one
SELECT * FROM users
WHERE id = $1 LIMIT 1;
WHERE id = $1 LIMIT 1;
11 changes: 11 additions & 0 deletions backend/db/company_questions_answers.sql.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions backend/db/models.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 8 additions & 15 deletions backend/db/users.sql.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5a12ea0

Please sign in to comment.