Open
Description
Was this issue already reported?
- I have searched the existing issues
On which platform did you encounter this issue?
Desktop app
What happened
If someone posted a job or portfolio with Manny v1, they cannot remove it with Manny v2's /remove
command. This is because Manny v2 doesn't search the job board channels for the post; it only searches a database, and only posts made with Manny v2 are added to the database.
When the command fails in this way, it logs an error:
The table `public.Job` does not exist in the current database.
at RequestHandler.handleRequestError (/home/pfist/bots/manny/node_modules/@prisma/client/runtime/index.js:29754:13)
at RequestHandler.request (/home/pfist/bots/manny/node_modules/@prisma/client/runtime/index.js:29737:12)
at async PrismaClient._request (/home/pfist/bots/manny/node_modules/@prisma/client/runtime/index.js:30709:16)
at async RemovePost.run (file:///home/pfist/bots/manny/src/commands/job-board/remove-post.js:53:22)
at async CommandHandler.handleSlashCommand (file:///home/pfist/bots/manny/node_modules/hiei.js/src/commands/CommandHandler.js:110:7) {
code: 'P2021',
clientVersion: '4.3.0',
meta: { table: 'public.Job' }
}
The column `Portfolio.channel` does not exist in the current database.
at RequestHandler.handleRequestError (/home/pfist/bots/manny/node_modules/@prisma/client/runtime/index.js:29754:13)
at RequestHandler.request (/home/pfist/bots/manny/node_modules/@prisma/client/runtime/index.js:29737:12)
at async PrismaClient._request (/home/pfist/bots/manny/node_modules/@prisma/client/runtime/index.js:30709:16)
at async RemovePost.run (file:///home/pfist/bots/manny/src/commands/job-board/remove-post.js:84:22)
at async CommandHandler.handleSlashCommand (file:///home/pfist/bots/manny/node_modules/hiei.js/src/commands/CommandHandler.js:110:7) {
code: 'P2022',
clientVersion: '4.3.0',
meta: { column: 'Portfolio.channel' }
}
What you expected
The /remove
command should work with any job or portfolio post.
Steps to reproduce
- Go to any text channel
- Type
/remove
and enter the ID of a job or portfolio posted with Manny 1.x - The command will fail and Manny will log an error