Skip to content

I get "--dev-url cannot be empty" on atlas schema apply -u ... -:to schema.sql #1761

Answered by a8m
205g0 asked this question in Q&A
Discussion options

You must be logged in to vote

Got it, check out my comment there: #1644 (comment)

TL;DR - The -u is meant to be the database you want to apply the schema on, and the --dev-url is a local dev-database that is used for validating, normalizing, and computing the state defined by the schema.sql file. You can change the command to the following:

atlas schema apply \
  --to file://schema.sql \
  -u $MY_DEV_DB \
  --dev-url "docker://mysql/8/dev"

Or:

atlas schema apply \
  --to file://schema.sql \
  -u $MY_DEV_DB \
  --dev-url "docker://postgres/15/dev?search_path=public"

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@205g0
Comment options

@a8m
Comment options

a8m Jun 19, 2023
Maintainer

Answer selected by 205g0
@205g0
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants