Automatic moderation (#875)

* Automatic moderation

* finish

* modpack fixes

* fix unknown license msg

* fix moderation issues
This commit is contained in:
Geometrically
2024-02-21 16:24:21 -07:00
committed by GitHub
parent 33b2a94d90
commit 04d834187b
43 changed files with 1597 additions and 158 deletions

View File

@@ -0,0 +1,19 @@
CREATE TABLE moderation_external_licenses (
id bigint PRIMARY KEY,
title text not null,
status text not null,
link text null,
exceptions text null,
proof text null,
flame_project_id integer null
);
CREATE TABLE moderation_external_files (
sha1 bytea PRIMARY KEY,
external_license_id bigint references moderation_external_licenses not null
);
ALTER TABLE files ADD COLUMN metadata jsonb NULL;
INSERT INTO users (id, username, name, email, avatar_url, bio, role, badges, balance)
VALUES (0, 'AutoMod', 'AutoMod', 'support@modrinth.com', 'https://cdn.modrinth.com/user/2REoufqX/6aabaf2d1fca2935662eca4ce451cd9775054c22.png', 'An automated account performing moderation utilities for Modrinth.', 'moderator', 0, 0)

View File

@@ -0,0 +1,2 @@
ALTER TABLE moderation_external_files ALTER COLUMN sha1 SET NOT NULL;
ALTER TABLE moderation_external_licenses ALTER COLUMN title DROP NOT NULL;