2

I would like to add few variables:"username' and "database" in my sqitch.conf on a defined target.

file sqitch.conf=>

    engine = pg

[core "variables"]
    username = jv_root
    database = test

[target "dev_1"]
        uri = db:pg://username@sqlhost:5432/database

[target "dev_2"]
        uri = db:pg://username@sqlhost2:5432/database

where I run: sqitch deploy -t dev_1 it throw an error => ERROR: no such user: username

Mai Same
  • 21
  • 1

1 Answers1

0

You can add environment specific variables like this.

[target.dev_1.variables]
  username = jv_root
  password = test

How you address them in your sql files depends on the sql dialect.

Ferdy
  • 497
  • 2
  • 4
  • 13