error: Uncaught (in promise) PostgresError: relation "questions" does not exist
return new PostgresError(errorFields);
^
at parseError (error.ts:106:10)
at Connection._processError (connection.ts:434:19)
at Connection._simpleQuery (connection.ts:340:22)
at async Connection.query (connection.ts:546:16)
at async Client.query (client.ts:25:12)
at async PostgresConnector.query (postgres-connector.ts:60:22)
at async Database.query (database.ts:164:21)
at async Function.createTable (model.ts:161:5)
at async Database.sync (database.ts:134:7)
at async app.ts:15:1
Changing the order and deleting static questions() helped get rid of the issue.
The documentation says that pivot table models should be added first, but it's not working this way for me.
Models:
The error I am getting:
Changing the order and deleting
static questions()
helped get rid of the issue.