Skip to content

Dev mode prompt during pnpm start #7986

Closed

Description

@artemszelenov

Link to reproduction

No response

Environment Info

Binaries:
  Node: 20.11.0
  npm: 10.2.4
  Yarn: N/A
  pnpm: 9.5.0
Relevant Packages:
  payload: 3.0.0-beta.95
  next: 15.0.0-canary.104
  @payloadcms/db-postgres: 3.0.0-beta.95
  @payloadcms/graphql: 3.0.0-beta.95
  @payloadcms/next/utilities: 3.0.0-beta.95
  @payloadcms/richtext-lexical: 3.0.0-beta.95
  @payloadcms/translations: 3.0.0-beta.95
  @payloadcms/ui/shared: 3.0.0-beta.95
  react: 19.0.0-rc-06d0b89e-20240801
  react-dom: 19.0.0-rc-06d0b89e-20240801
Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.6.0: Mon Jul 29 21:13:04 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T6020
  Available memory (MB): 16384
  Available CPU cores: 12

Describe the Bug

When I build my app and start it using pnpm start command I face this prompt:
It looks like you've run Payload in dev mode, meaning you've dynamically pushed changes to your database. If you'd like to run migrations, data loss will occur. Would you like to proceed?

Due to this prompt I can't migrate inside a docker container. So why payload says that I am in dev mode when I actually in prod mode? and how to change it to prod or disable the prompt?

Reproduction Steps

  1. use this db config
db: postgresAdapter({
		pool: {
			connectionString: process.env.DATABASE_URI || "",
		},
		prodMigrations: migrations,
		push: false,
	}),
  1. pnpm build
  2. pnpm start

Adapters and Plugins

No response

Activity

  1. added
    status: needs-triage
    on Aug 30, 2024
  2. denolfe commented on Aug 30, 2024

    @denolfe
    Member

    If you've connected to the database when in dev mode and then try to run a production migration against it. This is expected.

    If you want to avoid this message, delete the dev migration inside your payload_migrations table.

  3. removed
    status: needs-triage
    on Aug 30, 2024
  4. github-actions commented on Sep 6, 2024

    @github-actions
    Contributor

    This issue has been automatically locked.
    Please open a new issue if this issue persists with any additional detail.

  5. locked as resolved and limited conversation to collaborators on Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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