refactor database schema for blocked instances #229

Closed
opened 2022-11-09 23:13:23 +00:00 by Johann150 · 2 comments
Owner

Whether an instance is blocked is currently stored in meta.blockedHosts. Instead it would be more practical if this information was stored in the instance table, since instance.suspended is also already stored there.

After this is refactored, it would for example be possible to further simplify the code in packages/backend/src/misc/skipped-instances.ts.

Whether an instance is blocked is currently stored in `meta.blockedHosts`. Instead it would be more practical if this information was stored in the `instance` table, since `instance.suspended` is also already stored there. After this is refactored, it would for example be possible to further simplify the code in `packages/backend/src/misc/skipped-instances.ts`.
Johann150 added this to the (deleted) project 2022-11-09 23:13:23 +00:00
Author
Owner

I don't think it is a good idea to change this because the current data model allows you to block an instance that has not been fetched yet, which the new data model wouldn't allow you to do.

I don't think it is a good idea to change this because the current data model allows you to block an instance that has not been fetched yet, which the new data model wouldn't allow you to do.
Johann150 removed this from the (deleted) project 2022-12-01 07:01:47 +00:00
Owner

Would it potentially be worthwhile to refactor it into an "instance_relationship" table instead?
This would be useful for:

  1. The UI could be useful and reused.
  2. Extended later (e.g for allowlist stuff).
  3. Still allow blocking non-fetched instances.
Would it potentially be worthwhile to refactor it into an "instance_relationship" table instead? This would be useful for: 1. The UI could be useful and reused. 2. Extended later (e.g for allowlist stuff). 3. Still allow blocking non-fetched instances.
Sign in to join this conversation.
No labels
feature
fix
upkeep
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: FoundKeyGang/FoundKey#229
No description provided.