Page MenuHomePhabricator

[keyserver] introduce a table for communities
ClosedPublic

Authored by ginsu on May 6 2024, 6:48 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 6, 1:14 AM
Unknown Object (File)
Thu, Nov 21, 4:05 AM
Unknown Object (File)
Nov 18 2024, 12:46 PM
Unknown Object (File)
Nov 18 2024, 12:21 PM
Unknown Object (File)
Nov 18 2024, 10:31 AM
Unknown Object (File)
Nov 12 2024, 8:43 AM
Unknown Object (File)
Nov 11 2024, 5:43 AM
Unknown Object (File)
Nov 10 2024, 7:37 PM
Subscribers

Details

Summary

This new table will be used to store information about a community. For the scope of the project, I intentially made the schema for the table very limited + only focused on tagging a farcaster channel, and figured we could always alter the table in the future to include other things like invite links when I have more free cycles

Depends on D11894

Test Plan

Ran migration and confirmed the table was created. Also created a new db and confirmed that this also creates the communites table.

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

ginsu requested review of this revision.May 6 2024, 7:08 AM
keyserver/src/database/migration-config.js
775–789 ↗(On Diff #39846)

Please follow our conventions for alligning these

tomek requested changes to this revision.May 7 2024, 2:04 AM
tomek added inline comments.
keyserver/src/database/migration-config.js
775–811 ↗(On Diff #39846)

We don't need to have two separate queries from selecting and inserting. It is more efficient to have a single query - the data won't go through the JS. Also, simpler code means that it's more maintainable. This would be more important for non-migration code, but I still think we should make this change.

This revision now requires changes to proceed.May 7 2024, 2:04 AM
keyserver/src/database/migration-config.js
775–811 ↗(On Diff #39846)

Makes sense! Agree this is a lot more simple + easier to understand

tomek added inline comments.
keyserver/src/database/migration-config.js
786–788

Please update the indentation to match our conventions before landing.

keyserver/src/database/setup-db.js
478

We have to remember that there should be created a row in the communities table for this thread.

This revision is now accepted and ready to land.May 8 2024, 2:47 AM
keyserver/src/database/setup-db.js
478

Nuked my db, and confirmed that when i set up my db again, there was a row in the communities table for GENESIS