18e255c1

By: Michael Lynch <git@mtlynch.io>

Merge auth migrations and enforce user references

Merge the login_tokens and sessions schema into migration 002 so new databases create both auth tables together. Store auth user IDs as integer foreign keys to users(id), store auth timestamps as text timestamps, and enable SQLite foreign key enforcement on every connection.

Update the SQLite auth stores to convert simpleauth user IDs at the store boundary and round-trip timestamps through the existing text timestamp helpers. Add migration tests that check the merged schema, foreign keys, and rejection of auth rows for unknown users.

Suite timing

Time to Start Worker time Duration Time to finish
Config 0s 2s 2s 2s
Eval - - - -
Build 26s 1m07s - -
Test - - - -
Deploy - - - -
Suite 0s 1m10s - -

Timeline

0s30s40s50s