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:
28
scripts/debug/test-db-connection.ts
Normal file
28
scripts/debug/test-db-connection.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env tsx
|
||||
/**
|
||||
* Test database connection
|
||||
*/
|
||||
|
||||
import { config } from 'dotenv';
|
||||
config({ path: '.env.local' });
|
||||
config({ path: '.env' });
|
||||
|
||||
console.log('DATABASE_URL exists:', !!process.env.DATABASE_URL);
|
||||
console.log('DATABASE_URL value:', process.env.DATABASE_URL?.substring(0, 50) + '...');
|
||||
|
||||
import { prisma } from '../../src/lib/db';
|
||||
|
||||
async function testConnection() {
|
||||
try {
|
||||
const count = await prisma.church.count();
|
||||
console.log(`✅ Database connection successful!`);
|
||||
console.log(`Total churches in database: ${count}`);
|
||||
} catch (err: any) {
|
||||
console.log(`❌ Database connection failed:`);
|
||||
console.log(err.message);
|
||||
} finally {
|
||||
await prisma.$disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
testConnection();
|
||||
Reference in New Issue
Block a user