change datatypea and remove sqlc query

This commit is contained in:
nochill 2023-09-23 15:23:50 +07:00
parent 4564085075
commit cbf7a41c80
2 changed files with 5 additions and 11 deletions

View File

@ -8,11 +8,11 @@ CREATE TABLE users(
"banned_at" timestamp, "banned_at" timestamp,
"banned_until" timestamp, "banned_until" timestamp,
"ban_reason" varchar, "ban_reason" varchar,
"is_permaban" boolean, "is_permaban" boolean default(false),
"is_admin" boolean, "is_admin" boolean default(false),
"is_critics" boolean, "is_critics" boolean default(false),
"is_verified" boolean, "is_verified" boolean default(false),
"is_active" boolean, "is_active" boolean default(true),
"social_media" jsonb, "social_media" jsonb,
"created_at" timestamp default(now()), "created_at" timestamp default(now()),
"updated_at" timestamp default(now()) "updated_at" timestamp default(now())

View File

@ -15,12 +15,6 @@ WHERE
id = sqlc.arg(id) id = sqlc.arg(id)
RETURNING *; RETURNING *;
-- name: GetUser :one
SELECT * FROM USERS
WHERE username = $1;
-- name: UpdatePassword :exec -- name: UpdatePassword :exec
UPDATE users UPDATE users
SET password = $1 SET password = $1