Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Password with ? causes "Invalid URL" throw #947

Closed
bmxpiku opened this issue Nov 8, 2023 · 1 comment
Closed

Password with ? causes "Invalid URL" throw #947

bmxpiku opened this issue Nov 8, 2023 · 1 comment

Comments

@bmxpiku
Copy link

bmxpiku commented Nov 8, 2023

Hello, apparently when your password is generated with question mark it throws..

await migrate.default({
      // eslint-disable-next-line max-len
      databaseUrl: `postgres://${RDS_USER}:${RDS_PASSWORD}@${RDS_HOST}:${RDS_PORT}/db_name`,
      dir: 'migrations',
      direction: process.env.MIGRATION_DIRECTION || 'up',
      migrationsTable: 'migrations',
      count: process.env.MIGRATE_COUNT || 100,
    });

which produces in my case URL like
postgres://user:pass?word@hosting:5432/db_name
image

@bmxpiku
Copy link
Author

bmxpiku commented May 27, 2024

Solution is

${encodeURIComponent(RDS_PASSWORD)}

@salsita salsita locked and limited conversation to collaborators May 27, 2024
@Shinigami92 Shinigami92 converted this issue into discussion #1174 May 27, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant