Most people probably figure this out on their own but I am a total noob so I will give this question a shot for the sake of other noobs.
I am trying to set up laravel-tagging, a tagging system for Laravel framework, which probably has a similar structure to any other tagging system. It comes with 2 tables:
tagging_tags
tagging_tagged
tagging_tags
is where tags are stored.
tagging_tagged
is probably where tagged articles are stored, but I'm not sure.
The table tagging_tagged
contains a column taggable_id
, which doesn't come as a primary key and has no auto increment on it:
Field Type Null Key Default Extra
'id', 'int(10) unsigned', 'NO', 'PRI', NULL, 'auto_increment'
'taggable_id', 'int(10) unsigned', 'NO', 'MUL', NULL,
'taggable_type', 'varchar(255)', 'NO', 'MUL', NULL,
'tag_name', 'varchar(255)', 'NO', NULL,
'tag_slug', 'varchar(255)', 'NO', 'MUL', NULL,
Is taggable_id
a foreign key of an article that is tagged? Shouldn't it be tagged_id then? Can anyone point me to some newbie guide that explains tagging system structure or just explain what taggable_id
is for?
I apologize if this question is out of place.