Codoforum related discussions
Foreign keys in the DB

Hi guys. I was just looking at the DB structure, and I noticed, whenever there's an INT primary key, it's UNSIGNED, but whenever there's a foreign key, it's not UNSIGNED. For example, codo_posts.topic_id and codo_topics.topic_id.

Also, why is cat_id in codo_topics SMALLINT instead of INT? Is it not a foreign key into codo_categories?

Anyway, it would be more correct if the keys corresponded, so, I guess they can all be INT UNSIGNED.

Cheers!

Hi guys. I was just looking at the DB structure, and I noticed, whenever there's an INT primary key, it's UNSIGNED, but whenever there's a foreign key, it's not UNSIGNED. For example, codo_posts.topic_id and codo_topics.topic_id. Also, why is cat_id in codo_topics SMALLINT instead of INT? Is it not a foreign key into codo_categories? Anyway, it would be more correct if the keys corresponded, so, I guess they can all be INT UNSIGNED. Cheers!

Yes, it looks like there are some discrepancies in the database structure.

Thanks for letting us know, we will make any necessary changes.

Yes, it looks like there are some discrepancies in the database structure. Thanks for letting us know, we will make any necessary changes.
88
1
2
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft