Earlier quoted context omitted.
Well for one we should probably validate that the number is smaller than the total life of the physical universe. SQLite will gladly store a u64::MAX as a "unix timestamp" despite it being about 300x larger than the number of seconds that the universe and everything in it has existed. Try reading that back in any application date/time code and your app probably crashes immediately.
> SQLite will gladly store a u64::MAX as a "unix timestamp" SQLite does not support unsigned integers. > Try reading that back in any application date/time code and your app probably crashes immediately. Postgres will happily ingest and produce dates in the 280th millenium, which will also crash your application if its datetime type can’t handle that shrug . You can add a check constraint that your field passes throu…
omg you're right. Another example of SQLite's type-flimsyness.
> You can add a check constraint
So now we're just layering on our own brittle validation and runtime checks to make up for sqlite's woeful deficiency supporting even basic domain data types.