feat(cms): switch Payload to PostgreSQL with a fresh baseline migration (MITHOME-136)
- postgresAdapter (uuid ids, no push, prodMigrations), DATABASE_URI - src/payload.shared.ts: the config without the db adapter, shared with the one-off MongoDB content transfer - baseline migration 20260929_200306_initial (86 tables; applied twice on a disposable PostgreSQL 16: second run is a no-op) - seed copy (references, hosting plans) moved to src/content/seeds/ - MongoDB data migrations, their helpers/tests and the dead lib/mongodb.ts removed (kept in git history) - npm scripts for the Payload CLI (works now that the package is ESM) Branch only: staging has no PostgreSQL yet (tasks 3.x). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
a3d6cbe404
commit
e3ec6a9ac3
@@ -0,0 +1,27 @@
|
||||
import { HOSTING_PLAN_SEEDS, productData } from './hosting-plans'
|
||||
|
||||
describe('hosting plans seed (MITHOME-130)', () => {
|
||||
it('should seed the catalogue figures and prices as a draft, with an English AI draft', () => {
|
||||
const start = productData(HOSTING_PLAN_SEEDS[0], 'hu')
|
||||
expect(start).toMatchObject({
|
||||
slug: 'mit-start',
|
||||
productType: 'hosting',
|
||||
status: 'draft',
|
||||
enTranslationStatus: 'ai-draft',
|
||||
pricing: { netAmount: 14900, billingPeriod: 'yearly' },
|
||||
serviceDefinition: { storageGb: 3, mailStorageGb: 1, databases: 1, mailboxes: 5, ssl: true, spamFilter: true },
|
||||
_status: 'published',
|
||||
})
|
||||
expect(productData(HOSTING_PLAN_SEEDS[1], 'hu')).toMatchObject({
|
||||
highlighted: true,
|
||||
pricing: { netAmount: 23900 },
|
||||
serviceDefinition: { storageGb: 8, mailStorageGb: 4, domainAliases: 2, databases: 2, mailboxes: 10 },
|
||||
})
|
||||
})
|
||||
|
||||
it('should write only localized fields in English', () => {
|
||||
const en = productData(HOSTING_PLAN_SEEDS[0], 'en')
|
||||
expect(Object.keys(en).sort()).toEqual(['_status', 'public', 'serviceDefinition'])
|
||||
expect(en.serviceDefinition).toEqual({ backup: 'Daily, with 7-day restore' })
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user