sqitchers / docker-sqitch

Docker Image packaging for Sqitch
MIT License
35 stars 39 forks source link

bundle misplaces plan.conf to default location #20

Closed ClaytonJY closed 1 year ago

ClaytonJY commented 4 years ago

I've got a project whose sqitch.conf starts like this:

[core]
    engine = pg
    plan_file = sqitch.plan
    top_dir = sqitch-migrations

Accordingly, I have a sqitch.plan in the same directory as sqitch.conf, while all migrations are inside sqitch-migrations/

This all seems to work just fine, until I run sqitch bundle. Then inside my bundle/ folder I see sqitch.plan is at bundle/sqitch-migrations/sqitch.plan, instead of bundle/sqitch.plan. Attempting to do anything with sqitch from within bundle/ thus yields the error Plan file sqitch.plan does not exist.

This isn't a huge deal, since if I put sqitch.plan inside sqitch-migrations/ and update the line in sqitch.conf appropriately, it all works just fine, but it does seem like unexpected behavior.

theory commented 4 years ago

The plan file should be in the top directory. The configuration file should be in the current directory. The general idea is that if you have your change scripts in a subdirectory, it's because you have other stuff in the root (e.g., src).

I would expect, however, that when you bundle, the layout would leave the plan file in the same directory as the config file, since that's where you have it specified in the configuration file. That's not the case?