]> Untitled Git - lemmy.git/commit
Moving settings to Database. (#2492)
authorDessalines <dessalines@users.noreply.github.com>
Thu, 27 Oct 2022 09:24:07 +0000 (05:24 -0400)
committerGitHub <noreply@github.com>
Thu, 27 Oct 2022 09:24:07 +0000 (09:24 +0000)
commit235cc8b22897bfb3e71ba3dbd725d36863fea8ba
tree13409ac3cc2dc4a352cc593068f51dc1a1e27fe2
parent276a8c2bd3e4fd1323e66b808675cf14cf6f75c5
Moving settings to Database. (#2492)

* Moving settings to Database.

- Moves many settings into the database. Fixes #2285
- Adds a local_site and instance table. Fixes #2365 . Fixes #2368
- Separates SQL update an insert forms, to avoid runtime errors.
- Adds TypedBuilder to all the SQL forms, instead of default.

* Fix weird clippy issue.

* Removing extra lines.

* Some fixes from suggestions.

* Fixing apub tests.

* Using instance creation helper function.

* Move forms to their own line.

* Trying to fix local_site_data, still broken.

* Fixing federation tests.

* Trying to fix check features 1.

* Addressing PR comments.

* Adding check_apub to all verify functions.
179 files changed:
Cargo.lock
api_tests/.eslintrc.json
api_tests/.prettierrc.js
api_tests/package.json
api_tests/src/comment.spec.ts
api_tests/src/community.spec.ts
api_tests/src/follow.spec.ts
api_tests/src/post.spec.ts
api_tests/src/private_message.spec.ts
api_tests/src/shared.ts
api_tests/src/user.spec.ts
api_tests/yarn.lock
config/config.hjson
config/defaults.hjson
crates/api/src/comment/like.rs
crates/api/src/comment_report/create.rs
crates/api/src/community/hide.rs
crates/api/src/lib.rs
crates/api/src/local_user/add_admin.rs
crates/api/src/local_user/ban_person.rs
crates/api/src/local_user/get_captcha.rs
crates/api/src/local_user/login.rs
crates/api/src/local_user/notifications/mark_mention_read.rs
crates/api/src/local_user/notifications/mark_reply_read.rs
crates/api/src/local_user/save_settings.rs
crates/api/src/local_user/verify_email.rs
crates/api/src/post/like.rs
crates/api/src/post/lock.rs
crates/api/src/post/sticky.rs
crates/api/src/post_report/create.rs
crates/api/src/private_message/mark_read.rs
crates/api/src/private_message_report/create.rs
crates/api/src/site/leave_admin.rs
crates/api/src/site/mod_log.rs
crates/api/src/site/registration_applications/approve.rs
crates/api/src/site/registration_applications/list.rs
crates/api/src/site/registration_applications/unread_count.rs
crates/api/src/site/resolve_object.rs
crates/api/src/site/search.rs
crates/api_common/Cargo.toml
crates/api_common/src/site.rs
crates/api_common/src/utils.rs
crates/api_crud/src/comment/create.rs
crates/api_crud/src/comment/delete.rs
crates/api_crud/src/comment/list.rs
crates/api_crud/src/comment/read.rs
crates/api_crud/src/comment/remove.rs
crates/api_crud/src/comment/update.rs
crates/api_crud/src/community/create.rs
crates/api_crud/src/community/delete.rs
crates/api_crud/src/community/list.rs
crates/api_crud/src/community/read.rs
crates/api_crud/src/community/remove.rs
crates/api_crud/src/community/update.rs
crates/api_crud/src/post/create.rs
crates/api_crud/src/post/delete.rs
crates/api_crud/src/post/list.rs
crates/api_crud/src/post/read.rs
crates/api_crud/src/post/remove.rs
crates/api_crud/src/post/update.rs
crates/api_crud/src/private_message/create.rs
crates/api_crud/src/private_message/delete.rs
crates/api_crud/src/private_message/update.rs
crates/api_crud/src/site/create.rs
crates/api_crud/src/site/read.rs
crates/api_crud/src/site/update.rs
crates/api_crud/src/user/create.rs
crates/api_crud/src/user/read.rs
crates/apub/src/activities/block/block_user.rs
crates/apub/src/activities/block/undo_block_user.rs
crates/apub/src/activities/community/add_mod.rs
crates/apub/src/activities/community/announce.rs
crates/apub/src/activities/community/remove_mod.rs
crates/apub/src/activities/community/report.rs
crates/apub/src/activities/community/update.rs
crates/apub/src/activities/create_or_update/comment.rs
crates/apub/src/activities/create_or_update/post.rs
crates/apub/src/activities/create_or_update/private_message.rs
crates/apub/src/activities/deletion/delete.rs
crates/apub/src/activities/deletion/delete_user.rs
crates/apub/src/activities/deletion/mod.rs
crates/apub/src/activities/deletion/undo_delete.rs
crates/apub/src/activities/following/accept.rs
crates/apub/src/activities/following/follow.rs
crates/apub/src/activities/following/undo_follow.rs
crates/apub/src/activities/mod.rs
crates/apub/src/activities/voting/undo_vote.rs
crates/apub/src/activities/voting/vote.rs
crates/apub/src/collections/community_moderators.rs
crates/apub/src/fetcher/webfinger.rs
crates/apub/src/http/routes.rs
crates/apub/src/http/site.rs
crates/apub/src/lib.rs
crates/apub/src/objects/comment.rs
crates/apub/src/objects/community.rs
crates/apub/src/objects/instance.rs
crates/apub/src/objects/mod.rs
crates/apub/src/objects/person.rs
crates/apub/src/objects/post.rs
crates/apub/src/objects/private_message.rs
crates/apub/src/protocol/objects/group.rs
crates/db_schema/Cargo.toml
crates/db_schema/src/aggregates/comment_aggregates.rs
crates/db_schema/src/aggregates/community_aggregates.rs
crates/db_schema/src/aggregates/person_aggregates.rs
crates/db_schema/src/aggregates/post_aggregates.rs
crates/db_schema/src/aggregates/site_aggregates.rs
crates/db_schema/src/impls/activity.rs
crates/db_schema/src/impls/actor_language.rs
crates/db_schema/src/impls/comment.rs
crates/db_schema/src/impls/comment_reply.rs
crates/db_schema/src/impls/community.rs
crates/db_schema/src/impls/email_verification.rs
crates/db_schema/src/impls/federation_allowlist.rs [new file with mode: 0644]
crates/db_schema/src/impls/federation_blocklist.rs [new file with mode: 0644]
crates/db_schema/src/impls/instance.rs [new file with mode: 0644]
crates/db_schema/src/impls/local_site.rs [new file with mode: 0644]
crates/db_schema/src/impls/local_site_rate_limit.rs [new file with mode: 0644]
crates/db_schema/src/impls/local_user.rs
crates/db_schema/src/impls/mod.rs
crates/db_schema/src/impls/moderator.rs
crates/db_schema/src/impls/password_reset_request.rs
crates/db_schema/src/impls/person.rs
crates/db_schema/src/impls/person_mention.rs
crates/db_schema/src/impls/post.rs
crates/db_schema/src/impls/private_message.rs
crates/db_schema/src/impls/registration_application.rs
crates/db_schema/src/impls/site.rs
crates/db_schema/src/lib.rs
crates/db_schema/src/newtypes.rs
crates/db_schema/src/schema.rs
crates/db_schema/src/source/activity.rs
crates/db_schema/src/source/comment.rs
crates/db_schema/src/source/comment_reply.rs
crates/db_schema/src/source/community.rs
crates/db_schema/src/source/federation_allowlist.rs [new file with mode: 0644]
crates/db_schema/src/source/federation_blocklist.rs [new file with mode: 0644]
crates/db_schema/src/source/instance.rs [new file with mode: 0644]
crates/db_schema/src/source/local_site.rs [new file with mode: 0644]
crates/db_schema/src/source/local_site_rate_limit.rs [new file with mode: 0644]
crates/db_schema/src/source/local_user.rs
crates/db_schema/src/source/mod.rs
crates/db_schema/src/source/person.rs
crates/db_schema/src/source/person_mention.rs
crates/db_schema/src/source/post.rs
crates/db_schema/src/source/private_message.rs
crates/db_schema/src/source/registration_application.rs
crates/db_schema/src/source/site.rs
crates/db_schema/src/traits.rs
crates/db_schema/src/utils.rs
crates/db_views/Cargo.toml
crates/db_views/src/comment_report_view.rs
crates/db_views/src/comment_view.rs
crates/db_views/src/post_report_view.rs
crates/db_views/src/post_view.rs
crates/db_views/src/private_message_report_view.rs
crates/db_views/src/registration_application_view.rs
crates/db_views/src/site_view.rs
crates/db_views/src/structs.rs
crates/routes/src/nodeinfo.rs
crates/routes/src/webfinger.rs
crates/utils/Cargo.toml
crates/utils/src/rate_limit/mod.rs
crates/utils/src/settings/mod.rs
crates/utils/src/settings/structs.rs
crates/utils/src/test.rs
crates/utils/src/utils.rs
crates/utils/translations
crates/websocket/src/send.rs
docker/federation/lemmy_alpha.hjson
docker/federation/lemmy_beta.hjson
docker/federation/lemmy_delta.hjson
docker/federation/lemmy_epsilon.hjson
docker/federation/lemmy_gamma.hjson
migrations/2022-10-06-183632_move_blocklist_to_db/down.sql [new file with mode: 0644]
migrations/2022-10-06-183632_move_blocklist_to_db/up.sql [new file with mode: 0644]
src/code_migrations.rs
src/lib.rs
src/main.rs