Project structure for feature-like deployments #783
Closed
joaostorrer
started this conversation in
General
Replies: 2 comments
-
Can you use Variables to conditionally apply changes? I don't know which engine you're using, but the Postgres client, for example, supports conditional expressions, so you could do something like this in your deploy scripts: \if :feature_a
-- Add feature a
\endif You'd then set the variable using sqitch deploy --set feature_a=1 db:pg:cust1 Or add a customer-specific target to your configuration: sqitch target add cust1 db:pg:cust1 --set feature_a=1 Then it's always set for when you deploy to that target: sqitch deploy cust1 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Using variables the deploy just got better now. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I have a project that is deployed to multiple databases of the same engine, each database represents one customer.
This project consists of common objects and objects related to some feature.
Each customer can request different features, so the deployment is different for each one.
My question is what is the best approach to deal with this.
I started creating one sqitch project per feature, but the deployment was getting kind of messy (i had to call sqitch deploy for every sqitch project)
Then I tought of put all in one sqitch project and separate the deployment creating one plan file per customer (but this makes difficult to add/rework database objects).
I tought of separate one plan file per feature as well, but it gets the same situation as multiple sqitch projects.
I've read sqitch-configuration many times, but I'm still a little confused.
Beta Was this translation helpful? Give feedback.
All reactions