diff --git a/attached_assets/image_1772954248287.png b/attached_assets/image_1772954248287.png new file mode 100644 index 0000000..955c8b5 Binary files /dev/null and b/attached_assets/image_1772954248287.png differ diff --git a/server/seed.ts b/server/seed.ts index 93878da..cb83ad0 100644 --- a/server/seed.ts +++ b/server/seed.ts @@ -227,6 +227,24 @@ const seedArticles = [ ]; export async function seedDatabase() { + await db.execute(sql` + UPDATE articles SET + slug = 'john-prisco-die-geschichte-eines-musikers' + WHERE slug = 'john-prisco-die-geschichte-des-liedes' + `); + + await db.execute(sql` + DELETE FROM articles WHERE slug = 'folx-stadl-sendung-12' + `); + + await db.execute(sql` + UPDATE articles SET + title = REPLACE(REPLACE(title, '„', '„'), '“', '"'), + excerpt = REPLACE(REPLACE(excerpt, '„', '„'), '“', '"') + WHERE title LIKE '%„%' OR title LIKE '%“%' + OR excerpt LIKE '%„%' OR excerpt LIKE '%“%' + `); + const validSlugs = new Set(seedArticles.map((a) => a.slug)); const existing = await storage.getArticles(); const existingSlugs = new Set(existing.map((a) => a.slug)); @@ -293,25 +311,7 @@ export async function seedDatabase() { if (updated > 0) { console.log("Database seeded: updated " + updated + " existing articles."); } - - await db.execute(sql` - UPDATE articles SET - title = REPLACE(REPLACE(title, '„', '„'), '“', '“'), - excerpt = REPLACE(REPLACE(excerpt, '„', '„'), '“', '“') - WHERE title LIKE '%„%' OR title LIKE '%“%' - OR excerpt LIKE '%„%' OR excerpt LIKE '%“%' - `); - - await db.execute(sql` - UPDATE articles SET - slug = 'john-prisco-die-geschichte-eines-musikers' - WHERE slug = 'john-prisco-die-geschichte-des-liedes' - `); - - await db.execute(sql` - DELETE FROM articles WHERE slug = 'folx-stadl-sendung-12' - `); - } +} async function sendNewArticlePush(articles: typeof seedArticles) { const vapidPublic = process.env.VAPID_PUBLIC_KEY || "";