CognxSafeTrack
feat: finalize multi-tenant WhatsApp architecture for Meta Tech Provider review
3bf9adc | import { PrismaClient } from '@prisma/client'; | |
| async function main() { | |
| const prisma = new PrismaClient(); | |
| try { | |
| console.log('Inserting default organization via raw SQL...'); | |
| await prisma.$executeRaw`INSERT INTO "Organization" (id, name, "createdAt", "updatedAt") VALUES ('default-org-id', 'XAMLÉ Global', NOW(), NOW()) ON CONFLICT (id) DO NOTHING;`; | |
| console.log('Success!'); | |
| } catch (e) { | |
| console.error('Failed to insert via raw SQL. It might be because the table does not exist yet.'); | |
| console.error(e); | |
| } finally { | |
| await prisma.$disconnect(); | |
| } | |
| } | |
| main(); | |