Monorepo for Tangled tangled.org
757
fork

Configure Feed

Select the types of activity you want to include in your feed.

appview/db: more flexible tables #122

open opened by boltless.me targeting master from sl/sqkrqopzkvoo

migrate tables: stars, reactions, follows, public_keys

Two major changes:

  1. Remove autoincrement id for these tables.

AUTOINCREMENT primary key does not help much for these tables and only introduces slice performance overhead. Use default rowid with non-autoincrement integer instead.

  1. Remove unique constraints other than (did, rkey)

We cannot block users creating non-unique atproto records. Appview needs to handle those properly. For example, if user unstar a repo, appview should delete all existing star records pointing to that repo.

To allow this, remove all constraints other than (did, rkey).

Minor changes done while migrating tables:

  • rename thread_at in reactions to subject_at to match with other tables
  • follow common column names like did and created
  • allow self-follow (similar reason to 2nd major change. we should block it from service layer instead)

Signed-off-by: Seongmin Lee git@boltless.me

Labels

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:xasnlahkri4ewmbuzly2rlc5/sh.tangled.repo.pull/3mcsfwwhtpn22
Diff #0

No differences found between the selected revisions.

History

1 round 0 comments
sign up or login to add to the discussion
boltless.me submitted #0
patch application failed: error: No valid patches in input (allow with "--allow-empty")
expand 0 comments