database lacks 'not null' constraints
Already spoke about this with houz, documenting here for posterity and to make sure we don't forget.
08:38:52 < Dieterbe> hey houz , i noticed some tables don't have 'not null' constraints, like tagged_images
09:16:09 < houz> Dieterbe: what do you want to have the not null on and why?
10:21:34 < Dieterbe> houz: imgid integer, tagid integer <-- both of these should have a not null constraint, no? that would prevent from bad
records making their way into the db
10:22:07 < Dieterbe> houz: i was actually working on a script to update that table, and that's how i found out that tagged_images accepts
records such as (null, 123) or (null, null)
10:22:11 < houz> maybe, but 1) i don't see how they would get into the db and 2) they wouldn't really hurt i guess
10:23:00 < Dieterbe> not null constraints is just a good way to avoid bad data and to expose bugs quicker
10:26:32 < houz> probably. i will add it. thanks for reporting :)
even though i mostly care about tagged_images right now, it would be good to have not null constraints in all tables where we refer to an id.