-
Notifications
You must be signed in to change notification settings - Fork 629
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ Add a priority score value for ozone subjects (#3495)
* ✨ Add a priority score value for ozone subjects * 🚨 Bring back lock file * ✅ Update snapshot for pds proxied tests * ✅ Update takedown appeal snapshot * ✅ Update takedown appeal snapshot * ✅ Update repo and record snapshots * :rotating_lights: Fix lint issue * ✅ Update moderation events snapshot * ✅ Update moderation statuses snapshot * 🧹 Cleanup unnecessary durationInHours field * ✨ Allow filtering by priority score * ✨ Add test for priorityScore filter * 🚨 Fix import order * ✨ Allow 0 priority score filter * 📝 Add changeset
- Loading branch information
Showing
35 changed files
with
419 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
"@atproto/ozone": patch | ||
"@atproto/api": patch | ||
"@atproto/pds": patch | ||
--- | ||
|
||
Add a priority score to ozone subjects |
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
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
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
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
22 changes: 22 additions & 0 deletions
22
packages/ozone/src/db/migrations/20250204T003647759Z-add-subject-priority-score.ts
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,22 @@ | ||
import { Kysely } from 'kysely' | ||
|
||
export async function up(db: Kysely<unknown>): Promise<void> { | ||
await db.schema | ||
.alterTable('moderation_subject_status') | ||
.addColumn('priorityScore', 'integer', (col) => | ||
col.notNull().defaultTo('0'), | ||
) | ||
.execute() | ||
await db.schema | ||
.createIndex('moderation_subject_status_priority_score_index') | ||
.on('moderation_subject_status') | ||
.column('priorityScore') | ||
.execute() | ||
} | ||
|
||
export async function down(db: Kysely<unknown>): Promise<void> { | ||
await db.schema | ||
.alterTable('moderation_subject_status') | ||
.dropColumn('priorityScore') | ||
.execute() | ||
} |
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
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.