6
votes
Fortnightly Programming Q&A Thread
General Programming Q&A thread! Ask any questions about programming, answer the questions of other users, or post suggestions for future threads.
Don't forget to format your code using the triple backticks or tildes:
Here is my schema:
```sql
CREATE TABLE article_to_warehouse (
article_id INTEGER
, warehouse_id INTEGER
)
;
```
How do I add a `UNIQUE` constraint?
Does anyone have advice on using git tags in a personal project? The reason I ask is that I put my project on the AUR and the for the VCS version of the package, you're supposed to use git tags for versioning. How do I use them well? Do I just update the tag any time I have a working commit, basically? I've only ever used tags for my OS class this past spring but even then they just told us how to use them to submit our labs.
The Git Book is you best source on this.
You can think of tags as labels pointing to a specific commit.
I personally use them to mark releases (which I think is what the majority of the people use it for). Most online git hosting services also let you map releases to tags as well.
With regard to AUR, From the Guidelines you don't have to use tags (it def makes it easier), but you can also use number of revisions since beginning of the history.
I personally thing adding tags when you reach logical points of progress is a nice way to mark versions of your code (even if you are not releasing it to AUR)!
If your question is with regards to how to version your releases, there are a lot of methods out there. Semantic Versioning is pretty popular, and I think covers most use-cases.
One thing that versioning forces you to do as a developer is also think of a road-map for your application. As in what features you want to implement with each release, if you want to work on a feature that is going to break things, relegate it to a major release, assign bugs to minor releases, etc
Awesome, thank you! I was definitely wondering about both of those things so that's a super helpful reply :)