DEV Community

Discussion on: Sane Database Change Management

jimeuwoshkosh profile image

I thought I would try sqitch and your setup.
From the sqitch tutorial
$ sqitch init firstsqitch --uri --engine pg

Then your alter
$ sqitch engine alter pg --top-dir sql
Missing Engine "pg"; use "add pg db:pg:" to add it

Thought I try
$ sqitch engine add pg --top-dir sql
Created sql/
Created sql/sqitch.plan
Created sql/deploy/
Created sql/revert/
Created sql/verify/

It added 3 lines to sqitch.conf
$ cat sqitch.conf
engine = pg
# plan_file = sqitch.plan
# top_dir = .

[engine "pg"]

# target = db:pg:
# registry = sqitch
# client = psql
Enter fullscreen mode Exit fullscreen mode

[engine "pg"]
target = db:pg:
top_dir = sql

Forward I go.

jimeuwoshkosh profile image

On my second try with project, I put the top_dir declaration on 'sqitch init' command

sqitch init secondsqitch --uri --engine pg --top-dir sql

my repo has notes for the OS and DB user