You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After update to 0.7.7 Supysonic won't start due to syntax error in SQL.
May 20 10:47:53 trap000d.trap000d gunicorn[1097785]: peewee.ProgrammingError: syntax error at or near "user"
May 20 10:47:53 trap000d.trap000d gunicorn[1097785]: LINE 1: ALTER TABLE user ADD COLUMN listenbrainz_session CHAR(36)
May 20 10:47:53 trap000d.trap000d gunicorn[1097785]: ^
May 20 10:47:53 trap000d.trap000d gunicorn[1097785]: [2024-05-20 10:47:53 +1200] [1097785] [INFO] Worker exiting (pid: 1097785)
May 20 10:47:54 trap000d.trap000d gunicorn[1097781]: [2024-05-20 10:47:54 +1200] [1097781] [ERROR] Worker (pid:1097784) exited with code 3
May 20 10:47:54 trap000d.trap000d gunicorn[1097781]: [2024-05-20 10:47:54 +1200] [1097781] [ERROR] Worker (pid:1097783) was sent SIGTERM!
May 20 10:47:54 trap000d.trap000d gunicorn[1097781]: [2024-05-20 10:47:54 +1200] [1097781] [ERROR] Worker (pid:1097786) was sent SIGTERM!
May 20 10:47:54 trap000d.trap000d gunicorn[1097781]: [2024-05-20 10:47:54 +1200] [1097781] [ERROR] Worker (pid:1097785) was sent SIGTERM!
May 20 10:47:54 trap000d.trap000d gunicorn[1097781]: [2024-05-20 10:47:54 +1200] [1097781] [ERROR] Shutting down: Master
May 20 10:47:54 trap000d.trap000d gunicorn[1097781]: [2024-05-20 10:47:54 +1200] [1097781] [ERROR] Reason: Worker failed to boot.
After some googling it appeared that user is reserved word in PostgreSQL. Effectively there are two ways to fix the issue: either enclose it in quotes or use 'public' prefix for table name
schema/migration/postgres/20240318.sql:
ALTER TABLE "user" ADD COLUMN listenbrainz_session CHAR(36);
ALTER TABLE "user" ADD COLUMN listenbrainz_status BOOLEAN NOT NULL DEFAULT TRUE;
ALTER TABLE public.user ADD COLUMN listenbrainz_session CHAR(36);
ALTER TABLE public.user ADD COLUMN listenbrainz_status BOOLEAN NOT NULL DEFAULT TRUE;
The text was updated successfully, but these errors were encountered:
trap000d
changed the title
Postgesql migration to 0.7.7. fails due to syntax (reserved word)
Postgresql migration to 0.7.7. fails due to syntax (reserved word)
May 19, 2024
After update to 0.7.7 Supysonic won't start due to syntax error in SQL.
After some googling it appeared that
user
is reserved word in PostgreSQL. Effectively there are two ways to fix the issue: either enclose it in quotes or use 'public' prefix for table nameschema/migration/postgres/20240318.sql:
The text was updated successfully, but these errors were encountered: