Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Database support #15

Closed
Hokkaydo opened this issue Jun 3, 2023 · 5 comments
Closed

Database support #15

Hokkaydo opened this issue Jun 3, 2023 · 5 comments
Assignees
Labels
new feature New feature or request

Comments

@Hokkaydo
Copy link
Owner

Hokkaydo commented Jun 3, 2023

Add database support and migrate all current files to db

@Hokkaydo Hokkaydo added the new feature New feature or request label Jun 3, 2023
@ananas-dev
Copy link
Contributor

Hi, I would like to implement this, what files should be migrated ?

@ananas-dev
Copy link
Contributor

Is there a preference for a certain type of database? I was thinking of something like sqlite because it is simple and portable but nosql options such as mongodb can do the job too.

@Hokkaydo
Copy link
Owner Author

Hokkaydo commented Aug 10, 2023

Hi, I would like to implement this, what files should be migrated?

It's a little bit messy.
The files are generated at runtime if not already present.
Those three files should be migrated to different tables :

  • "warned_confessions" => currently in the format "moderatorId;;;authorId;;;timestamp", should become a table "id, warned_confession_message_id, author_id, content, moderator_id, timestamp"
  • "message_ids": currently in the format "threadId;path", should become a table "id, thread_id, path"
  • "mirrors": currently in the format "channelA;channelB", should become a table "id, channel_a, channel_b."

We should also have a few tables to store course static data :

  • "courses" => "id, course_code, course_name, quarter, groupId" (eg: (0, "LINMA1315", "Complément d'analyse", 4, 3))
  • "course_groups" => "id, group_code, french_name" (e.g.: (3, "MAP", "Filière en Mathématiques Appliquées" => (integer, string, string))

Additionally, I want to implement a new feature requiring a table "notices" with columns "id, author_id, subject_id, timestamp, type, content" (e.g.: (0, 45646565, 4, 255555566) => (integer, integer, integer, Date, string, string))

Is there a preference for a certain type of database? I was thinking of something like SQLite because it is simple and portable but nosql options such as MongoDB can do the job too.

To me, the easier to implement is SQLite, I don't think we need the storage size of MongoDB but if you think the latter is a better choice, you're free to go.

Btw, if you could write an interface to handle different storage types, it could help us if we want to move on to another database later.

@Hokkaydo
Copy link
Owner Author

#32 Is waiting for you

This was referenced Oct 31, 2023
@Hokkaydo Hokkaydo linked a pull request Oct 31, 2023 that will close this issue
@Hokkaydo
Copy link
Owner Author

Solved in #41

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature or request
Projects
Status: 🔖 Pushed
Development

Successfully merging a pull request may close this issue.

2 participants