Skip to content

Commit 3656299

Browse files
committed
fix: remove bad post
Fixes A-CENTRALIZED-MIRROR-1K
1 parent 0d30cd1 commit 3656299

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
using FruityFoundation.DataAccess.Abstractions;
2+
3+
namespace WebApi.Scripts;
4+
5+
/// <summary>
6+
/// Script_2025_04_08T17_41_RemoveBadPostId
7+
/// </summary>
8+
public class Script_2025_04_08T17_41_RemoveBadPostId : IDbMaintenanceScript
9+
{
10+
/// <inheritdoc />
11+
public async Task Run(IDatabaseConnection<ReadWrite> dbConnection)
12+
{
13+
const string postId = "1jt7wsc";
14+
15+
await dbConnection.Execute(
16+
"""
17+
BEGIN TRANSACTION;
18+
DELETE FROM reddit_comments WHERE reddit_post_id = @postId;
19+
DELETE FROM link_queue WHERE reddit_post_id = @postId;
20+
DELETE FROM links WHERE reddit_post_id = @postId;
21+
COMMIT;
22+
""", new { postId }, CancellationToken.None);
23+
}
24+
}

0 commit comments

Comments
 (0)