I'm developing a nodejs project with a postgresql-db. I've created a table called 'UserAsanas'. It's definitely there, I've checked and re-checked.
But when I try to multi-row insert it keeps telling me the following:
error: relation "UserAsanas" does not exist
const cs = pgp.helpers.ColumnSet(['UserID', 'AsanaID', 'RoutineID'], { table: 'UserAsanas' });
const values = [{UserID: 1, AsanaID: 2,RoutineID: 1}, {UserID: 1, AsanaID: 33,RoutineID: 1}];
const multi = pgp.helpers.insert(values, cs)+ ' RETURNING id';
// INSERT INTO "UserAsanas"("UserID","AsanaID","RoutineID") VALUES(1,2,1),(1,33,1) RETURNING id
db.none(multi).then(data=> {
res.status(201)
})
.catch( err => {
return next(err)
})