Tutorial Improvements: recommend naming structure #76

joevandyk opened this Issue Feb 26, 2013 · 8 comments


None yet

3 participants


The sqitch tutorial doesn't seem to have any recommendations for how to name the changes. Having some sort of a common convention would be nice.

Maybe something like:

   alterations # used for adding columns to tables/types

So, a new function would be functions/insert_flip.

Adding a column to the orders table would be alterations/orders_add_email_address

theory commented Feb 26, 2013

Happy to see a "Sqitch Best Practices" document. I'm still figuring them out myself. Sometimes I name a change that adds a table for the table, e.g., "widgets", other times I include the object type in the change name, e.g., "widgets_table". And for some projects, with a lot of changes, I end up putting things in subdirectories, e.g., "tables/widgets". I think it will be informative to see what sorts of cow paths people form. I don't think I would commit to something yet, myself.

Frankly different folks will prefer different styles, sometimes for different projects. Fortunately, Sqitch can accommodate different opinions on such things.


Not saying you need to commit to it, but a general recommendation would be nice. If people don't realize that they can put the deployment scripts into a different directory, then they will end up with hundreds of files in the same directory.

Is it possible to change the location of a deployment file after it's been made and deployed?

theory commented Feb 26, 2013

Yeah, revert to the change before it, then edit sqitch.plan and move the file where you want it. So if you wanted to move deploy/widgets.sql into deploy/tables/widgets.sql, you'd first revert (assuming your'e doing dev, not production):

sqitch revert --to widgets^

Move the file and change the name in the sqitch.plan file from widgets to tables/widgets (always a slash, regardless of your OS or file system). Then you can sqitch deploy and be back in business.

theory commented Feb 26, 2013

Hey, you know what, we should make use of the GitHub wiki for this kind of documentation, at least for now. Feel free to start some pages!


Sure thing.

BTW, starting with github pages is pretty easy (for the sqitch website).
Click settings, then click the 'Automatic Page Generator' button.

That creates a gh-pages branch that you can edit and push to.

On Tue, Feb 26, 2013 at 3:01 PM, David E. Wheeler

Hey, you know what, we should make use of the GitHub wikihttps://github.com/theory/sqitch/wikifor this kind of documentation, at least for now. Feel free to start some

Reply to this email directly or view it on GitHubhttps://github.com/theory/sqitch/issues/76#issuecomment-14145585

theory commented Feb 28, 2013

Yeah, that's how I created the existing site. I just haven't gotten round to updating it.


@theory are you still looking for contributors on this? @spatrickkelly and I are trying to develop naming conventions, but would love to leverage existing. Is there any existing documentation on naming conventions? If yes, where? If not, where could we put forth our ideas for review by you and the community?

theory commented May 27, 2015

No document, though I have my own conventions, I guess. Others in my office use different conventions. Happy to discuss on the mail list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment