- Updated all packages to latest versions (React 19, Next.js 14.2.32) - Replaced sqlite3 with pg and drizzle-orm dependencies - Created complete PostgreSQL schema with relationships and indexes - Migrated all API endpoints from SQLite to Drizzle queries - Added database seeding with sample data - Updated authentication to use bcrypt instead of pbkdf2 - Configured connection pooling for PostgreSQL - Updated app version to 1.0.0 - All endpoints tested and working correctly
19 lines
440 B
TypeScript
19 lines
440 B
TypeScript
import * as dotenv from 'dotenv';
|
|
|
|
// Load environment variables first
|
|
dotenv.config({ path: '.env.local' });
|
|
|
|
import { seedDatabase } from '../lib/db/seed';
|
|
|
|
async function main() {
|
|
try {
|
|
console.log('Using DATABASE_URL:', process.env.DATABASE_URL ? 'configured' : 'missing');
|
|
await seedDatabase();
|
|
process.exit(0);
|
|
} catch (error) {
|
|
console.error('Failed to seed database:', error);
|
|
process.exit(1);
|
|
}
|
|
}
|
|
|
|
main(); |