chore: sync with Gitea master and restore local-only files

Reset local main to gitea/master (new source of truth) and restored
local-only files: web scrapers, admin dashboard, ChromaDB integration,
debug scripts, and utility libraries that aren't tracked in Gitea.

Gitea master adds: discovermass, buscarmisas-network, hk-parishes,
bohosluzby, kerknet, gottesdienstzeiten, miserend importers,
ClaimRequest model, forward geocoding, heartbeat healthcheck.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Albert
2026-04-12 19:11:22 -04:00
parent 76cca3ba75
commit 2c51513851
133 changed files with 30381 additions and 0 deletions

View File

@@ -0,0 +1,54 @@
import { config } from 'dotenv';
import { Pool } from 'pg';
import { PrismaPg } from '@prisma/adapter-pg';
import { PrismaClient } from '@prisma/client';
// Load environment variables
config({ path: '.env.local' });
config({ path: '.env' });
// Create connection pool
const connectionString = process.env.DATABASE_URL || '';
const pool = new Pool({ connectionString });
// Create Prisma adapter
const adapter = new PrismaPg(pool);
// Create Prisma client with adapter
const prisma = new PrismaClient({
adapter,
log: ['error'],
});
async function main() {
console.log('Populating cityNormalized field using SQL...');
// Use raw SQL for much faster batch update
// Normalize: lowercase, remove special chars except spaces/numbers, trim
const result = await prisma.$executeRaw`
UPDATE churches
SET city_normalized = LOWER(
TRIM(
REGEXP_REPLACE(
COALESCE(city, ''),
'[^a-zA-Z0-9 ]',
'',
'g'
)
)
)
WHERE city IS NOT NULL
`;
console.log(`✅ Updated ${result} churches with normalized cities`);
}
main()
.then(async () => {
await prisma.$disconnect();
})
.catch(async (e) => {
console.error(e);
await prisma.$disconnect();
process.exit(1);
});