fix: corrigir seed para usar chave composta slug_locale

This commit is contained in:
Erik
2025-11-27 12:35:37 -03:00
parent 8aa4aacd25
commit 5e33da4063

View File

@@ -24,10 +24,11 @@ async function main() {
// 2. Seed para página Home
const homePage = await prisma.pageContent.upsert({
where: { slug: 'home' },
where: { slug_locale: { slug: 'home', locale: 'pt' } },
update: {},
create: {
slug: 'home',
locale: 'pt',
content: {
hero: {
title: 'Engenharia de Excelência para Seus Projetos',
@@ -130,10 +131,11 @@ async function main() {
// 3. Seed para página Sobre
const sobrePage = await prisma.pageContent.upsert({
where: { slug: 'sobre' },
where: { slug_locale: { slug: 'sobre', locale: 'pt' } },
update: {},
create: {
slug: 'sobre',
locale: 'pt',
content: {
hero: {
title: 'Sobre a OCCTO Engenharia',
@@ -165,10 +167,11 @@ async function main() {
// 4. Seed para página Contato
const contatoPage = await prisma.pageContent.upsert({
where: { slug: 'contato' },
where: { slug_locale: { slug: 'contato', locale: 'pt' } },
update: {},
create: {
slug: 'contato',
locale: 'pt',
content: {
hero: {
title: 'Entre em Contato',