conversely / backend

alllll the backend stuff
MIT License
0 stars 1 forks source link

Tag Data Tables #25

Open ghost opened 10 years ago

ghost commented 10 years ago

I'm proposing some possible table structures to get us rolling. What does everyone think of this for the tag data?

Tag Table: id, label, createtime Post_Tag Table: id, post(post.tag), tag(tag.id), createtime

I don't remember if we wanted tags to be relevant only to the user tagging the article, or if we wanted them to be public. If they're relevant only to users:

Tag Table: id, user(user.id), label, createtime

It might be worth tracking which user creates/applies a tag either way:

Post_Tag Table: id, post(post.id), tag(tag.id), user(user.id), createtime

I also have it noted that we could use an action notation for adding/removing tags applied to a tag to retain the actions. Something like that. What's everyone think?

jarofghosts commented 10 years ago

tags are meant to be public and act as a categorization method. that does raise the idea of personal tags, but that's definitely out of scope for an initial release.

i think putting the user id in there is good. might consider marking the post_tag relationship as active or not