From 9e8f450cd4b566f27d79bddd14cf7e60c8a8ccff Mon Sep 17 00:00:00 2001 From: ideclon Date: Thu, 22 Dec 2022 23:47:59 +0000 Subject: [PATCH] add database --- appwrite.json | 329 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 329 insertions(+) diff --git a/appwrite.json b/appwrite.json index a4775d3..b6c2358 100644 --- a/appwrite.json +++ b/appwrite.json @@ -48,5 +48,334 @@ "schedule": "*/1 * * * *", "timeout": 15 } + ], + "collections": [ + { + "$id": "servers", + "$createdAt": "2022-11-28T00:15:46.337+00:00", + "$updatedAt": "2022-11-28T00:16:55.140+00:00", + "$permissions": [ + "read(\"users\")" + ], + "databaseId": "637fd77aae471453b595", + "name": "servers", + "enabled": true, + "documentSecurity": false, + "attributes": [ + { + "key": "server_url", + "type": "string", + "status": "available", + "required": true, + "array": false, + "size": 1000, + "default": null + }, + { + "key": "client_id", + "type": "string", + "status": "available", + "required": true, + "array": false, + "size": 100, + "default": null + }, + { + "key": "client_secret", + "type": "string", + "status": "available", + "required": true, + "array": false, + "size": 100, + "default": null + }, + { + "key": "app_access_token", + "type": "string", + "status": "available", + "required": false, + "array": false, + "size": 100, + "default": null + } + ], + "indexes": [ + { + "key": "server_url", + "type": "unique", + "status": "available", + "attributes": [ + "server_url" + ], + "orders": [ + "DESC" + ] + } + ] + }, + { + "$id": "hashtags", + "$createdAt": "2022-11-30T20:47:50.076+00:00", + "$updatedAt": "2022-11-30T20:47:50.076+00:00", + "$permissions": [], + "databaseId": "637fd77aae471453b595", + "name": "hashtags", + "enabled": true, + "documentSecurity": false, + "attributes": [ + { + "key": "user", + "type": "string", + "status": "available", + "required": true, + "array": false, + "size": 100, + "default": null + }, + { + "key": "hashtag", + "type": "string", + "status": "available", + "required": true, + "array": false, + "size": 500, + "default": null + }, + { + "key": "lastseen", + "type": "datetime", + "status": "available", + "required": true, + "array": false, + "format": "", + "default": null + }, + { + "key": "points", + "type": "integer", + "status": "available", + "required": true, + "array": false, + "min": 0, + "max": 9223372036854775807, + "default": null + } + ], + "indexes": [ + { + "key": "user_id", + "type": "key", + "status": "available", + "attributes": [ + "user" + ], + "orders": [ + "DESC" + ] + }, + { + "key": "hashtag", + "type": "key", + "status": "available", + "attributes": [ + "hashtag" + ], + "orders": [ + "DESC" + ] + }, + { + "key": "getUsersHashtags", + "type": "key", + "status": "available", + "attributes": [ + "user", + "hashtag" + ], + "orders": [ + "DESC", + "DESC" + ] + } + ] + }, + { + "$id": "index_history", + "$createdAt": "2022-11-30T21:05:31.728+00:00", + "$updatedAt": "2022-11-30T21:05:31.728+00:00", + "$permissions": [], + "databaseId": "637fd77aae471453b595", + "name": "index_history", + "enabled": true, + "documentSecurity": false, + "attributes": [ + { + "key": "user_id", + "type": "string", + "status": "available", + "required": true, + "array": false, + "size": 100, + "default": null + }, + { + "key": "last_post_id", + "type": "string", + "status": "available", + "required": true, + "array": false, + "size": 300, + "default": null + }, + { + "key": "populating_new_index", + "type": "boolean", + "status": "available", + "required": false, + "array": false, + "default": true + }, + { + "key": "first_post_id", + "type": "string", + "status": "available", + "required": false, + "array": false, + "size": 500, + "default": null + }, + { + "key": "feed_name", + "type": "string", + "status": "available", + "required": true, + "array": false, + "elements": [ + "home", + "favourites", + "bookmarks", + "local", + "federated", + "profile" + ], + "format": "enum", + "default": null + } + ], + "indexes": [ + { + "key": "queryIndexHistory", + "type": "key", + "status": "available", + "attributes": [ + "user_id", + "feed_name" + ], + "orders": [ + "DESC", + "DESC" + ] + }, + { + "key": "unique", + "type": "unique", + "status": "available", + "attributes": [ + "user_id", + "feed_name" + ], + "orders": [ + "DESC", + "DESC" + ] + } + ] + }, + { + "$id": "suggested", + "$createdAt": "2022-12-19T00:03:11.695+00:00", + "$updatedAt": "2022-12-19T23:18:53.402+00:00", + "$permissions": [], + "databaseId": "637fd77aae471453b595", + "name": "suggested", + "enabled": true, + "documentSecurity": true, + "attributes": [ + { + "key": "post_link", + "type": "string", + "status": "available", + "required": true, + "array": false, + "size": 2000, + "default": null + }, + { + "key": "points", + "type": "integer", + "status": "available", + "required": true, + "array": false, + "min": 0, + "max": 9223372036854775807, + "default": null + }, + { + "key": "user_id", + "type": "string", + "status": "available", + "required": true, + "array": false, + "size": 100, + "default": null + }, + { + "key": "local_link", + "type": "string", + "status": "available", + "required": false, + "array": false, + "size": 2000, + "default": null + } + ], + "indexes": [ + { + "key": "point_sort", + "type": "key", + "status": "available", + "attributes": [ + "points", + "user_id" + ], + "orders": [ + "DESC", + "DESC" + ] + }, + { + "key": "points", + "type": "key", + "status": "available", + "attributes": [ + "points" + ], + "orders": [ + "DESC" + ] + }, + { + "key": "link_unique", + "type": "unique", + "status": "failed", + "attributes": [ + "post_link" + ], + "orders": [ + "DESC" + ] + } + ] + } ] } \ No newline at end of file