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
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?
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.
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!
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?
No document, though I have my own conventions, I guess. Others in my office use different conventions. Happy to discuss on the mail list.