chore: add remaining db migration and translation scripts
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import { getPayload } from 'payload'
|
||||
import configPromise from '../src/payload.config'
|
||||
|
||||
async function run() {
|
||||
const payload = await getPayload({ config: configPromise })
|
||||
const home = await payload.find({ collection: 'pages', where: { slug: { equals: 'home' } }, locale: 'pl' })
|
||||
const blocks = home.docs[0].layout?.map(b => b.blockType)
|
||||
console.log("HOME PL BLOCKS:", blocks)
|
||||
|
||||
const homeEn = await payload.find({ collection: 'pages', where: { slug: { equals: 'home' } }, locale: 'en' })
|
||||
console.log("HOME EN BLOCKS:", homeEn.docs[0].layout?.map(b => b.blockType))
|
||||
|
||||
process.exit(0)
|
||||
}
|
||||
run().catch(console.error)
|
||||
Reference in New Issue
Block a user