discord-tickets / bot

The most popular open-source and self-hosted ticket management bot for Discord - a free alternative to the premium and white-label plans of other popular ticketing bots.
https://discordtickets.app
GNU General Public License v3.0
880 stars 459 forks source link

[BUG] Time periods stored as milliseconds can be too large for the field type #530

Open eartharoid opened 4 months ago

eartharoid commented 4 months ago

Is there an existing issue for this?

Current Behavior

ms is used to convert strings like 1 day into milliseconds, but some reasonable inputs like 30d are too large to store.

Expected Behavior

No response

Steps To Reproduce

No response

Environment

- OS: -
- Node: -
- NPM: -
- Bot: <4.1

Anything else?

Database types: https://www.prisma.io/docs/orm/reference/prisma-schema-reference#int

Affected fields: https://github.com/discord-tickets/bot/blob/c45f27793728c390cdaf185686ef2bb0f06bfeda/db/mysql/schema.prisma#L75 https://github.com/discord-tickets/bot/blob/c45f27793728c390cdaf185686ef2bb0f06bfeda/db/mysql/schema.prisma#L115 https://github.com/discord-tickets/bot/blob/c45f27793728c390cdaf185686ef2bb0f06bfeda/db/mysql/schema.prisma#L130