Page MenuHomePhabricator

[keyserver] introduce a table for communities
AcceptedPublic

Authored by ginsu on Mon, May 6, 6:48 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, May 17, 7:22 PM
Unknown Object (File)
Sun, May 12, 3:17 AM
Unknown Object (File)
Sat, May 11, 10:08 PM
Unknown Object (File)
Sat, May 11, 9:48 PM
Unknown Object (File)
Sat, May 11, 7:51 PM
Unknown Object (File)
Fri, May 10, 10:32 AM
Unknown Object (File)
Thu, May 9, 2:43 PM
Unknown Object (File)
Mon, May 6, 6:48 PM
Subscribers

Details

Reviewers
tomek
kamil
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.Mon, May 6, 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.Tue, May 7, 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.Tue, May 7, 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.Wed, May 8, 2:47 AM