#migrate:create throws error

1 messages · Page 1 of 1 (latest)

rocky pewter
#

/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/payload/src/bin/migrate.ts:100
throw new Error(Error creating migration: ${error})
^

Error: Error creating migration: [
{
"code": "invalid_literal",
"expected": "7",
"path": [
"version"
],
"message": "Invalid literal value, expected "7""
},
{
"code": "invalid_literal",
"expected": "postgresql",
"path": [
"dialect"
],
"message": "Invalid literal value, expected "postgresql""
},
{
"code": "invalid_type",
"expected": "object",
"received": "undefined",
"path": [
"tables"
],
"message": "Required"
},
{
"code": "invalid_type",
"expected": "object",
"received": "undefined",
"path": [
"enums"
],
"message": "Required"
},
{
"code": "invalid_type",
"expected": "object",
"received": "undefined",
"path": [
"schemas"
],
"message": "Required"
},
{
"code": "invalid_type",
"expected": "object",
"received": "undefined",
"path": [
"_meta"
],
"message": "Required"
},
{
"code": "invalid_type",
"expected": "string",
"received": "undefined",
"path": [
"prevId"
],
"message": "Required"
}
]
at migrate (/node_modules/payload/src/bin/migrate.ts💯15)
at async start (/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/payload/bin.js:30:7)

Node.js v23.11.1
 ELIFECYCLE  Command failed with exit code 1.

rocky pewter
#

Couriously, after running pnpm payload migrate:create your_migration_name --force-accept-warning --skip-empty, I was able to create new migrations just fine again …

Not sure what the issue was, but I guess it’s fixed?