Closed DMSavchik closed 1 year ago
You probably wont need to create new entities by yourself. The discordx implement an EAV design pattern that allows you to store key/(strongly typed)value pairs without having to create entities, so it would be better to use the native EAV pattern provided by the discordx team for this purpose instead of creating your own entities, since it is more suitable for discord usage!
I would not recommend going through the headache of creating your own own entities in the database and defining their relationships. Headache solved with the provided EAV pattern! 👍
For more information about the implemented EAV pattern check the discordx documentation bellow: https://barthofu.github.io/tscord-docs/docs/bot/features/database/single-data-type
What happened?
After I added the new property to User entity named balance I expected it to go live with next boot up of the bot.
On other hand it gave me the error first saying that column is not present, after investigation got an adivse to make migration for DB
Which brough up an error:
then we found that this can be fixed by changing the way it described in User Entiry
Which is works nice.
Would be good to iclude this in the Documentation for visibility
Reproduction
add new property
and try to migrate with sqlite as your database
Relevant log output
Code of Conduct