293
: ( (lemmy.dbzer0.com)
you are viewing a single comment's thread
view the rest of the comments
[-] deadbeef79000@lemmy.nz 12 points 1 week ago* (last edited 1 week ago)

Use a CHAR(1) you can then use it as an enumeration.

Don't use T/F for true/false use it for the actual sematic meaning for the thing that the Boolean is toggling. E g. S for subscribed, U for unsubscribed, or whatever.

It also means when you inevitably grow to needing a tri-state it makes sense.

Unless SQLite actually supports enumerations, then just use them

[-] SpaceNoodle@lemmy.world 5 points 1 week ago

I think you could use a CHECK constraint to effectively create en enum

this post was submitted on 10 May 2026
293 points (100.0% liked)

Programmer Humor

31455 readers
1045 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS