Somewhere between version 3.40.1 2022-12-28 14:03:47 and 3.46.1 2024-08-13 09:16:08,
sqlite3 gained the ability to provide a subsecond 'now'.
select datetime('now', 'subsec'); works as expected in 3.46.1, but not in 3.40.1.
Unfortunately the version on DigitalOcean is the older one, instead use:
select strftime('%Y-%m-%d %H:%M:%f', 'now');
For example:
create table Foo (
id integer primary key,
created datetime default (strftime('%y-%m-%d %h:%m:%f', 'now'))
);
See DigitalOcean
The example code has a random number as the session secret key:
SECRET_KEY=secrets.token_urlsafe(32)
This doesnt work in gunicorn if there are several workers because each worker gets a separate key.
See the gunicorn home page.