const { PrismaClient } = require("@prisma/client"); const p = new PrismaClient(); const exec = p.$executeRawUnsafe.bind(p); const disconnect = p.$disconnect.bind(p); async function main() { await exec( 'ALTER TABLE "GisFeature" ADD COLUMN IF NOT EXISTS "geometrySource" TEXT', ); console.log("OK: geometrySource column added"); await exec( 'CREATE INDEX IF NOT EXISTS "GisFeature_geometrySource_idx" ON "GisFeature" ("geometrySource")', ); console.log("OK: index created"); await disconnect(); } main().catch((e) => { console.log("ERR:", e.message); disconnect(); });