fix: corrigir seed para usar chave composta slug_locale
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user