DEV Community

Discussion on: Building a Todo List Application with Flask

Collapse
 
capcom6 profile image
capcom6

Category name is not unique, is it normal to use it in foreign key? What about using Category.name as primary key instead of id?

Collapse
 
nagatodev profile image
Faruq Abdulsalam

Hello capcom,

Thanks for your observation. I have made the change to the User model. I decided to use Category.Id with the foreign key instead.

Thanks for reading