+ Exposing serde_json to db-lib lyaer
This dep was already there but just being used (as we're using serde). Now we can use it at the db layer which makes neighbor struct creation easier * Cargo locks are being updated to reflect new dependancy changes These changes actually reduce the dependancy count overall + Adding a very simple table to hold all the neighbors that an instance may want to reference At some point we may want to support vanity join urls and this would be a good place to reference those There would also need to be a way for admins to add/edit/remove vanity urls but that's for another patch
This commit is contained in:
1
json-api/migrations/2021-05-04-200859_neighbors/down.sql
Normal file
1
json-api/migrations/2021-05-04-200859_neighbors/down.sql
Normal file
@@ -0,0 +1 @@
|
||||
DROP TABLE `neighbors`;
|
||||
10
json-api/migrations/2021-05-04-200859_neighbors/up.sql
Normal file
10
json-api/migrations/2021-05-04-200859_neighbors/up.sql
Normal file
@@ -0,0 +1,10 @@
|
||||
-- everything else is nullable due to
|
||||
-- A) Flexibility
|
||||
-- B) They're part of optional features(such as the wsurl which not all servers may have)
|
||||
CREATE TABLE IF NOT EXISTS `neighbors`(
|
||||
`url` VARCHAR(512) UNIQUE NOT NULL,
|
||||
`wsurl` VARCHAR(512),
|
||||
`name` VARCHAR(512) NOT NULL,
|
||||
`description` VARCHAR(1024),
|
||||
`tags` VARCHAR(1024)
|
||||
);
|
||||
Reference in New Issue
Block a user