sqlx icon indicating copy to clipboard operation
sqlx copied to clipboard

sqlx_cli can not read database_url from .env in win10

Open oralpast opened this issue 3 years ago • 4 comments

why? and when you migrate with error,you have to fix _sqlx_migrations mannuly.this is boring.

oralpast avatar Apr 14 '22 11:04 oralpast

Please include the error you get from sqlx-cli.

abonander avatar Apr 14 '22 18:04 abonander

error: The following required arguments were not provided: --database-url <DATABASE_URL>

USAGE: sqlx database create --database-url <DATABASE_URL>

For more information try --help

oralpast avatar Apr 17 '22 00:04 oralpast

  • Have you checked your in the right directory for the .env to be detected by sqlx-cli?
  • If so, is DATABASE_URL=.. in your .env file correctly?

Owez avatar May 01 '22 16:05 Owez

  • Have you checked your in the right directory for the .env to be detected by sqlx-cli?
  • If so, is DATABASE_URL=.. in your .env file correctly?

my project directory: |---.env |---src I had add DATABASE_URL= in my .env file,and this directory is working in ubuntu not windows

oralpast avatar May 16 '22 11:05 oralpast