mampf icon indicating copy to clipboard operation
mampf copied to clipboard

Undefined Table error in empty MaMpf database

Open Splines opened this issue 10 months ago • 1 comments

In a completely empty mampf database, we get this error:

PG::UndefinedTable: ERROR:  relation "media" does not exist
LINE 10:  WHERE a.attrelid = '"media"'::regclass

If the database is reseeded beforehand, this error does not occur since the respective tables exist.


To me, this is not an urgent problem since reseeding just fixes this. For people who install MaMpf from the ground up, this can become a problem. As a solution, one would probably have to incorporate a script to the entrypoint that sets up the most basic MaMpf tables such that Rails can actually run through the migrations afterwards.

Splines avatar Feb 01 '25 14:02 Splines

Might want to modify db/create-mampf-db.sql introduced via #736. See also Pre-seed the database by bind-mounting a SQL script.

Splines avatar Feb 01 '25 14:02 Splines