fix: backfill official news covers after migration
This commit is contained in:
@@ -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')")
|
||||||
|
|||||||
Reference in New Issue
Block a user