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
{{ message }}
Repository navigation
[Bug] PostgreSQL migration fails on restart: idx_reviews_user_date already exists #136
When using PostgreSQL and restarting the server, the migration fails with: failed to initialize database: failed to execute schema file system_postgres.sql: pq: relation "idx_reviews_user_date" already exists.
In system_postgres.sql, the index idx_reviews_user_date is created without IF NOT EXISTS. All other indexes in the same file use CREATE INDEX IF NOT EXISTS. This makes the server impossible to restart when using PostgreSQL.
FIX: CREATE INDEX IF NOT EXISTS idx_reviews_user_date ON reviews(user_id, review_date);
Activity
stefan-ernst commentedon Jul 5, 2026
Hi, I think I spotted the root cause for this: Just to confirm, are you using a postgresql schema other than "public"?
mbeq commentedon Jul 7, 2026
stefan-ernst commentedon Jul 9, 2026
Thanks! I will push a new release next week - in the meantime, you can use the :main tag if you use docker
stefan-ernst commentedon Jul 21, 2026
0.8.2 is finally out. This should solve the migration issue. Let me know if it works
mvkotowski commentedon Oct 15, 2026
For those of you like me that had this same issue, for some reason when you map to a directory make sure to map to
volumes:
- /location/onyour/drive:/var/lib/postgresql/
not /var/lib/postgresql/data