diff --git a/db/migrations/000001_init_schema.up.sql b/db/migrations/000001_init_schema.up.sql index 78818a0..68f6c49 100644 --- a/db/migrations/000001_init_schema.up.sql +++ b/db/migrations/000001_init_schema.up.sql @@ -8,11 +8,11 @@ CREATE TABLE users( "banned_at" timestamp, "banned_until" timestamp, "ban_reason" varchar, - "is_permaban" boolean, - "is_admin" boolean, - "is_critics" boolean, - "is_verified" boolean, - "is_active" boolean, + "is_permaban" boolean default(false), + "is_admin" boolean default(false), + "is_critics" boolean default(false), + "is_verified" boolean default(false), + "is_active" boolean default(true), "social_media" jsonb, "created_at" timestamp default(now()), "updated_at" timestamp default(now()) diff --git a/db/queries/users.sql b/db/queries/users.sql index 2b00d00..b953d44 100644 --- a/db/queries/users.sql +++ b/db/queries/users.sql @@ -15,12 +15,6 @@ WHERE id = sqlc.arg(id) RETURNING *; - --- name: GetUser :one -SELECT * FROM USERS -WHERE username = $1; - - -- name: UpdatePassword :exec UPDATE users SET password = $1