Closed Kruhlmann closed 4 years ago
id | user_id | answer | sent |
---|---|---|---|
INT or UUID | STRING | STRING | DATETIME |
It seems postgres 12 does not support my virtual machine architecture, so might have to settle for a lower version like 10 if sqlite isn't used instead.
Looks like postgres 11 is avaliable, which should serve the project well potentially together with https://github.com/salsita/node-pg-migrate for migration handling.
node-pg-migrate
and has a working initial migration.
My thoughts are increasingly that this project needs a database since it's deviated somewhat from the initial idea.
One option is sqlite3, which is used in the classicdb_bot project and has usable code examples and migrations. This solution is significantly easier to implement but scales extremely poorly, which might not be a huge issue. Alternatively for a more scalable solution postgres could be used.
Discord user IDs could be stored with their cool down and there would no longer be a need to keep a hashed version of the answers with the actual captcha message. Instead this could be stored in the database.