Commit graph

9 commits

Author SHA1 Message Date
Laura Hausmann
84b8553a40
[backend/database] Switch to in-model entity configuration 2024-11-18 19:02:43 +01:00
kopper
7173373330
[backend/federation] Improved reply backfill
Instead of backfilling every note we come across that has a reply
collection, only schedule a backfill job if someone wants to see the
replies (on GET MastoAPI /context, or Iceshrimp API /descendants)

Reply backfilling is also done on a ThreadIdOrId basis as opposed to the
previous way of backfilling individual notes. This allows us finer
grained control over the recursion and frees up the job queue, alongside
allowing for easier implementation of context collection backfill in the
future (by mapping each context collection to a thread)

---

Currently, note threads are implicit based on the "threadId" column of a
note, which can be null (where it's the same as the note's "id")

This commit turns note threads into an actual entity, and as a part of
that, makes "threadId" non-nullable (by specifically setting it to "id"
for those cases)

This is done to attach extra metadata to the entire thread, currently
just the time of when it was last backfilled, but more may be added in
the future (the context collection associated with this thread, for example)

---

The data format for backfill jobs have backwards-incompatibly changed
since the introduction of the feature. We can drop all old jobs without
causing too much trouble as they will be re-scheduled on demand

---

Signed-off-by: Laura Hausmann <laura@hausmann.dev>
2024-10-24 21:18:57 +02:00
Laura Hausmann
79c3a9c891
[backend/database] Replace complex Index/PrimaryKey/ForeignKey references with their nameof() equivalents 2024-04-19 20:19:51 +02:00
Laura Hausmann
9e11398938
[backend/database] Refactor ForeignKey attributes to use nameof() where applicable (ISH-24) 2024-04-19 20:11:26 +02:00
Laura Hausmann
d10dbec5b7
[backend/database] Refactor Index attributes to use nameof() where applicable (ISH-24) 2024-04-19 20:11:26 +02:00
Laura Hausmann
d4e1d92771
[backend] Code cleanup: switch to BSD braces style, tweak code style 2024-02-17 02:31:00 +01:00
Laura Hausmann
af7a776337
[backend] Refactor inverse properties; add projectable computed properties to the User class 2024-02-03 02:13:50 +01:00
Laura Hausmann
dcfd417ecf
Rename indicies 2024-01-07 19:43:41 +01:00
Laura Hausmann
ea6612de25
Initial commit 2023-12-24 00:57:07 +01:00