podaboutlist / linkfix-for-discord

LinkFix brings link embeds back to your Discord server! Simply post Twitter, Instagram, TikTok, or Reddit links and LinkFix will reply with a rich media embed.
https://discord.com/application-directory/385950397493280805
GNU Affero General Public License v3.0
16 stars 4 forks source link

feature: implement PostgreSQL for storage of per-server settings #13

Closed RalphORama closed 9 months ago

RalphORama commented 9 months ago

Summary

As LinkFix gets added to more servers, several people have reached out requesting features that would require per-server configuration. We need to store those configurations.

Methodology

Firstly, I am going to try to avoid using ORMs as much as possible. the pg package offers the ability to execute raw queries which should be good enough for our requirements. If, in the future, the database gets more complicated, I wouldn't have an issue moving to something like Sequelize.

Secondly, I want LinkFix to store as little data as possible. I think we shouldn't create records for guilds until someone in the guild actually sets configuration options. This keeps us in the clear for crap like GDPR, plus I personally believe in data privacy myself and don't want to become a vector of attack for other people.

Database Structire

https://dbdiagram.io/d/LinkFix-658b15e289dea6279992fb74

image

RalphORama commented 9 months ago

closed due to branch renane