Skip to content

Postgres migration script fails builds on vercel #14794

@HamedMP

Description

@HamedMP

Describe the Bug

Hey, running payload migrate gives this code:

import { MigrateUpArgs, MigrateDownArgs, sql } from "@payloadcms/db-postgres";

Image

Which fails in build time

Image

Every time I have to change it to:

import type { MigrateUpArgs, MigrateDownArgs } from "@payloadcms/db-postgres";

import { sql } from "@payloadcms/db-postgres";

and then it works

Link to the code that reproduces this issue

/

Reproduction Steps

Create a migration with postgres and deploy to vercel.

Which area(s) are affected? (Select all that apply)

db: postgres

Environment Info

vercel

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions