Remove integrity check for database service

This commit is contained in:
2025-06-08 15:24:03 +09:00
parent a728ebb66c
commit 40e3754628

View File

@ -63,7 +63,7 @@ export function performDatabaseIntegrityFixes(db: Database): void {
); );
} else { } else {
console.log( console.log(
`⚠️ Could not find matching feed for article: ${article.title} (${articleDomain})`, `! Could not find matching feed for article: ${article.title} (${articleDomain})`,
); );
} }
} }
@ -84,7 +84,7 @@ export function performDatabaseIntegrityFixes(db: Database): void {
if (orphanedEpisodes.length > 0) { if (orphanedEpisodes.length > 0) {
console.log( console.log(
`⚠️ Found ${orphanedEpisodes.length} episodes with invalid article references`, `! Found ${orphanedEpisodes.length} episodes with invalid article references`,
); );
// We could delete these or try to fix them, but for now just log // We could delete these or try to fix them, but for now just log
} }
@ -289,16 +289,6 @@ export async function saveFeed(
feed.active !== undefined ? (feed.active ? 1 : 0) : 1, // Default to active=1 if not specified feed.active !== undefined ? (feed.active ? 1 : 0) : 1, // Default to active=1 if not specified
); );
try {
performDatabaseIntegrityFixes(db);
console.log(`Feed saved: ${feed.url}`);
} catch (error) {
console.error(
"Error performing integrity fixes after saving feed:",
error,
);
}
return id; return id;
} catch (error) { } catch (error) {
console.error("Error saving feed:", error); console.error("Error saving feed:", error);