feat: add profile_picture
field to user table
This commit is contained in:
11
migrations/00003_add_profile_image.sql
Normal file
11
migrations/00003_add_profile_image.sql
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
-- +goose Up
|
||||||
|
-- +goose StatementBegin
|
||||||
|
ALTER TABLE users
|
||||||
|
ADD profile_picture TEXT;
|
||||||
|
-- +goose StatementEnd
|
||||||
|
|
||||||
|
-- +goose Down
|
||||||
|
-- +goose StatementBegin
|
||||||
|
ALTER TABLE users
|
||||||
|
DROP COLUMN profile_picture;
|
||||||
|
-- +goose StatementEnd
|
@ -14,3 +14,8 @@ SELECT * FROM users WHERE email = $1 LIMIT 1;
|
|||||||
|
|
||||||
-- name: FindUserId :one
|
-- name: FindUserId :one
|
||||||
SELECT * FROM users WHERE id = $1 LIMIT 1;
|
SELECT * FROM users WHERE id = $1 LIMIT 1;
|
||||||
|
|
||||||
|
-- name: UpdateProfilePicture :exec
|
||||||
|
UPDATE users
|
||||||
|
SET profile_picture = $1
|
||||||
|
WHERE id = $2;
|
||||||
|
Reference in New Issue
Block a user