Skip to content

Commit edbe0bf

Browse files
committed
fix: remove bad post
1 parent 4c78983 commit edbe0bf

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_06_18T13_33_RemoveBadPostId
7+
/// </summary>
8+
public class Script_2025_06_18T13_33_RemoveBadPostId : IDbMaintenanceScript
9+
{
10+
/// <inheritdoc />
11+
public async Task Run(IDatabaseConnection<ReadWrite> dbConnection)
12+
{
13+
const string postId = "1ktxul6";
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)