diff options
| author | nsfisis <nsfisis@gmail.com> | 2024-07-27 01:17:18 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2024-07-27 01:17:18 +0900 |
| commit | e487036c5cc9f5b59e9efbaec132a2fd60896317 (patch) | |
| tree | 3dc88db51084587c99ca87685b923c12f193661e /backend | |
| parent | b1ab411ba7b93af94d505a88e2d242316607246b (diff) | |
| download | iosdc-japan-2025-albatross-e487036c5cc9f5b59e9efbaec132a2fd60896317.tar.gz iosdc-japan-2025-albatross-e487036c5cc9f5b59e9efbaec132a2fd60896317.tar.zst iosdc-japan-2025-albatross-e487036c5cc9f5b59e9efbaec132a2fd60896317.zip | |
db: rename users.icon_url to users.icon_path
Diffstat (limited to 'backend')
| -rw-r--r-- | backend/db/models.go | 2 | ||||
| -rw-r--r-- | backend/db/query.sql.go | 6 | ||||
| -rw-r--r-- | backend/schema.sql | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/backend/db/models.go b/backend/db/models.go index bc2010d..4eda2cc 100644 --- a/backend/db/models.go +++ b/backend/db/models.go @@ -19,7 +19,7 @@ type User struct { UserID int32 Username string DisplayUsername string - IconUrl pgtype.Text + IconPath pgtype.Text IsAdmin bool CreatedAt pgtype.Timestamp } diff --git a/backend/db/query.sql.go b/backend/db/query.sql.go index d5158b5..5c4f910 100644 --- a/backend/db/query.sql.go +++ b/backend/db/query.sql.go @@ -12,7 +12,7 @@ import ( ) const getUserAuthFromUsername = `-- name: GetUserAuthFromUsername :one -SELECT users.user_id, username, display_username, icon_url, is_admin, created_at, user_auth_id, user_auths.user_id, auth_type, password_hash FROM users +SELECT users.user_id, username, display_username, icon_path, is_admin, created_at, user_auth_id, user_auths.user_id, auth_type, password_hash FROM users JOIN user_auths ON users.user_id = user_auths.user_id WHERE users.username = $1 ` @@ -21,7 +21,7 @@ type GetUserAuthFromUsernameRow struct { UserID int32 Username string DisplayUsername string - IconUrl pgtype.Text + IconPath pgtype.Text IsAdmin bool CreatedAt pgtype.Timestamp UserAuthID int32 @@ -37,7 +37,7 @@ func (q *Queries) GetUserAuthFromUsername(ctx context.Context, username string) &i.UserID, &i.Username, &i.DisplayUsername, - &i.IconUrl, + &i.IconPath, &i.IsAdmin, &i.CreatedAt, &i.UserAuthID, diff --git a/backend/schema.sql b/backend/schema.sql index 6a2db2d..999d628 100644 --- a/backend/schema.sql +++ b/backend/schema.sql @@ -2,7 +2,7 @@ CREATE TABLE users ( user_id SERIAL PRIMARY KEY, username VARCHAR(64) NOT NULL UNIQUE, display_username VARCHAR(64) NOT NULL, - icon_url VARCHAR(255), + icon_path VARCHAR(255), is_admin BOOLEAN NOT NULL, created_at TIMESTAMP NOT NULL DEFAULT NOW() ); |
