-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Any interest in a "recipes" documentation section? #10
Comments
This would be really useful. I wonder if it'd make sense to have some sort
of per-DB "Sqitch libraries". We have a bunch of these things for Pg at
work to do things like check if a type of trigger exists so we can (try to)
write idempotent Sqitch migrations.
One option would be to have this built into sqitch itself, so when you run
migrations it writes out the library to a temp file and set a var with the
path. Setting it with pg means running `psql --set SQITCH_LIB=...`. Then in
your migration itself you can write `\i :SQITCH_LIB/helpers.sql`.
I have no idea how this works for any other DB. It's been ages since I've
used any others, and I've only used Sqitch with Pg.
Alternatively, the helpers could be distributed separately. I think in that
case it'd probably make sense to just check them into your repo and
reference them from migrations via a relative path, like `\ir
../../sqitch-lib/helpers.sql`.
Cheers,
Dave Rolsky
http://blog.urth.org
https://github.com/autarch
…On Mon, Sep 6, 2021 at 2:00 PM Matt DeLuco ***@***.***> wrote:
As I convert more of my database to sqitch, I'm having to learn all the
different ways of verifying that various objects have been created during
deployment.
Is there any interest in adding a "recipes" section to the documentation
for sqitch? There are some examples in the tutorial, but I'm thinking of
something more comprehensive and organized to make specific types of tests
easy to find.
On a related note - to consolidate this kind of functionality is there a
means of creating some kind of library of assertions that could be imported
into each verify script? Similar to the chaijs <https://www.chaijs.com>
javascript assertion library? I guess they'd all have to be DB specific - I
work entirely in Postgres so I'm thinking along the lines of pl/pgsql
functions.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#10>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAMMKL7IKP2HVNAM5I5VSTUAUFUFANCNFSM5DQ562JA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As I convert more of my database to sqitch, I'm having to learn all the different ways of verifying that various objects have been created during deployment.
Is there any interest in adding a "recipes" section to the documentation for sqitch? There are some examples in the tutorial, but I'm thinking of something more comprehensive and organized to make specific types of tests easy to find.
On a related note - to consolidate this kind of functionality is there a means of creating some kind of library of assertions that could be imported into each verify script? Similar to the chaijs javascript assertion library? I guess they'd all have to be DB specific - I work entirely in Postgres so I'm thinking along the lines of pl/pgsql functions.
The text was updated successfully, but these errors were encountered: