-
-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(reports): ability to restrict reports server wide
- Loading branch information
Showing
10 changed files
with
328 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
apps/yuudachi/migrations/1673411947-reports-restriction-level.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** | ||
* @param {import('postgres').Sql} sql | ||
*/ | ||
export async function up(sql) { | ||
await sql.unsafe(` | ||
create type guild_reports_restriction_level as enum ('enabled', 'restricted', 'blocked'); | ||
alter table guild_settings | ||
add column reports_restriction_level guild_reports_restriction_level not null default 'enabled'; | ||
alter table guild_settings | ||
add column reports_restriction_reason text default null; | ||
comment on column guild_settings.reports_restriction_reason is 'The reason why reports are blocked/restricted in this guild'; | ||
comment on column guild_settings.reports_restriction_level is 'The restriction_level of reports in this guild, whether they are enabled, restricted (requires confirmation), or blocked'; | ||
`); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.