chore: add remaining db migration and translation scripts
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { getPayload } from 'payload'
|
||||
import configPromise from '../src/payload.config'
|
||||
import fs from 'fs'
|
||||
|
||||
async function run() {
|
||||
const payload = await getPayload({ config: configPromise })
|
||||
|
||||
const header = await payload.findGlobal({ slug: 'header', locale: 'pl' })
|
||||
const footer = await payload.findGlobal({ slug: 'footer', locale: 'pl' })
|
||||
const pages = await payload.find({ collection: 'pages', locale: 'pl' })
|
||||
|
||||
fs.writeFileSync('content_dump.json', JSON.stringify({ header, footer, pages }, null, 2))
|
||||
console.log("Dumped to content_dump.json")
|
||||
process.exit(0)
|
||||
}
|
||||
run().catch(console.error)
|
||||
Reference in New Issue
Block a user