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