sqitchers/sqitch

Possible to have separate plans for schemas in the same database?

peter-wimsey opened this issue · 1 comments

Hello Sqitchers,

We have a Snowflake database with two rather large schemas and we would like to keep deployment of these schemas separate.

Ideally, the file layout would be something like:

sqitch-project/
  - schema1/
    - schema1.plan
    - deploy/
    - revert/
    - ...
  - schema2/
    - schema2.plan
    - deploy/
    - revert/
    - ...

Could this be achieved with separate targets as described in https://sqitch.org/docs/manual/sqitch-configuration/#different-target-different-plan ?

That is, can we have two targets pointing to the same database? Will these two target share the same registry?

Thanks

That looks to me more like separate plans. A target generally refers to a single database, so if you have one big snowflake database, that's probably just one target, which you'd have defined in sqitch.conf at the project root, so that it can be used for both schemas:

cd schema1
sqitch status my-big-db
cd ../schema2
sqitch status my-big-db