fix: backfill official news covers after migration
Validate and deploy staging / validate (push) Successful in 23s
Validate and deploy production / validate (push) Successful in 27s
Validate and deploy staging / deploy (push) Successful in 29s
Validate and deploy production / deploy (push) Failing after 20s

This commit is contained in:
jb
2026-08-01 22:30:21 -04:00
parent dc08eefce6
commit 92e1f58320
+14
View File
@@ -699,6 +699,20 @@ if (
"ALTER TABLE external_news_sources ADD COLUMN thumbnail_alt TEXT NOT NULL DEFAULT ''", "ALTER TABLE external_news_sources ADD COLUMN thumbnail_alt TEXT NOT NULL DEFAULT ''",
); );
} }
if (externalNewsSourceColumns.length) {
const missingThumbnail = await (
await database.prepare(
'SELECT 1 AS present FROM external_news_sources WHERE thumbnail_url IS NULL LIMIT 1',
)
).get();
if (missingThumbnail) {
await (
await database.prepare(
"UPDATE external_news_provider_state SET next_check_at=NULL WHERE provider='ubisoft'",
)
).run();
}
}
const currentModerationScanColumns = await ( const currentModerationScanColumns = await (
await database.prepare("PRAGMA table_info('content_moderation_scans')") await database.prepare("PRAGMA table_info('content_moderation_scans')")