Files
advx/prisma/migrations/[timestamp]_add_template_config.ts
T
2025-04-10 23:07:21 -03:00

20 lines
462 B
TypeScript

import { PrismaClient } from '@prisma/client'
const prisma = new PrismaClient()
async function main() {
await prisma.$executeRaw`
ALTER TABLE "configuracao_documento"
ADD COLUMN "templatePadrao" TEXT,
ADD COLUMN "margensTemplate" JSONB DEFAULT '{"top": 35, "bottom": 29, "left": 25, "right": 25}'::jsonb;
`;
}
main()
.catch(e => {
console.error(e);
process.exit(1);
})
.finally(async () => {
await prisma.$disconnect();
});