Skip to content

HAMUR_E5525: A db factory file does not fit the migrations

A db factory file does not fit the migrations. Error HAMUR_E5525 belongs to @hamur/db (5501 – 5600).

Message

text
HAMUR_E5525 <file>: db "<connection>" has no table "<table>" (did you mean "<known>"?)
text
HAMUR_E5525 <file>: db "<connection>" has no table "<table>"
text
HAMUR_E5525 <file>: db.connections has no connection "<connection>"
text
HAMUR_E5525 <first> and <second> both write the factory of "<table>"

Cause

A file of server/db/factories is named for a table that the connection's migrations do not create, sits in a folder that is not a connection, or has the same name as another file of its folder. Each line is one problem.

Fix

Rename the file to the table, move it to the folder of its connection, or add the migration that creates the table.