payloadcms/payload · warning · Error
Migration aborted: version__status column not found in ${ver
Error message
Migration aborted: version__status column not found in ${versionsTable} table. This migration should only run on schemas that have NOT yet been migrated to per-locale status. If you've already run this migration, no action is needed. What it means
Guard from `migratePostgresLocalizeStatus`: before doing any writes it checks that the `version__status` column exists on the `_<entity>_v` versions table. The column is the v2-era single-status column this migration converts to per-locale status; its absence means the schema is either already migrated or never had v2-style status. The migration aborts rather than corrupt an already-migrated or fresh schema.
Source
Thrown at packages/drizzle/src/postgres/predefinedMigrations/localize-status/index.ts:98
})
return
}
// Validate that version__status column exists before proceeding
const columnCheckResult = await db.execute({
drizzle: db.drizzle,
sql: sql`
SELECT EXISTS (
SELECT FROM information_schema.columns
WHERE table_schema = ${schemaName}
AND table_name = ${versionsTable}
AND column_name = 'version__status'
) as exists
`,
})
if (!columnCheckResult.rows[0]?.exists) {
throw new Error(
`Migration aborted: version__status column not found in ${versionsTable} table. ` +
`This migration should only run on schemas that have NOT yet been migrated to per-locale status. ` +
`If you've already run this migration, no action is needed.`,
)
}
// 1. Check if the locales table exists
const localesTableCheckResult = await db.execute({
drizzle: db.drizzle,
sql: sql`
SELECT EXISTS (
SELECT FROM information_schema.tables
WHERE table_schema = ${schemaName}
AND table_name = ${localesTable}
) as exists
`,
})
View on GitHub (pinned to 00c58b35c0)
Solutions
- Treat the abort as benign if the migration already ran — no action is needed (the message says so explicitly).
- If you believe it should run, confirm the DB is actually at the pre-migration v2 state (check `information_schema.columns` for `version__status` on the versions table).
- Ensure you are pointing at the correct database/schema (`schemaName`) for the not-yet-migrated environment.
Example fix
// Verify whether the migration is actually needed before invoking: // SELECT EXISTS (SELECT FROM information_schema.columns // WHERE table_name = '_posts_v' AND column_name = 'version__status'); // If false -> already migrated; skip migratePostgresLocalizeStatus.
Defensive patterns
Strategy: try-catch
Validate before calling
// Pre-check the column; skip the migration if already converted
const { rows } = await db.execute({ drizzle: db.drizzle, sql: sql`
SELECT EXISTS (
SELECT FROM information_schema.columns
WHERE table_schema = ${schemaName}
AND table_name = ${versionsTable}
AND column_name = 'version__status'
) as exists
` })
if (!rows[0]?.exists) {
payload.logger.info('version__status absent; localize-status migration already applied or not applicable.')
} else {
await migratePostgresLocalizeStatus(args)
} Type guard
null
Try / catch
try {
await migratePostgresLocalizeStatus(args)
} catch (err) {
if (/version__status column not found/.test(String(err?.message))) {
payload.logger.info('Localize-status migration not applicable; continuing.')
return
}
throw err
} Prevention
- Treat this error as an idempotency guard, not a failure.
- Record migration runs in a bookkeeping table to avoid re-invocation.
- Pre-check the schema before invoking predefined migrations.
When it happens
Trigger: Running the localize-status migration on a database where it has already run (column already dropped), or on a fresh v3 schema that never had `version__status`. Also if the entity slug maps to a non-existent versions table.
Common situations: Re-running the migration after partial completion; pointing the migration at a DB already upgraded to per-locale status; dev DB recreated from v3 schema (no v2 history).
Related errors
- Either collectionSlug or globalSlug must be provided
- Cannot provide both collectionSlug and globalSlug
- Localization is not enabled in payload config
- ${collectionSlug ? 'Collection' : 'Global'} not found: ${col
- Migration aborted: version__status column not found in ${ver
AI-assisted analysis of payloadcms/payload@00c58b35c0 (2026-08-12).
Data as JSON: /api/errors/379f3f17a4e911c6.
Report an issue: GitHub.