diesel supports SQLite and can replace all the current derive macro functionality. The current table structs can derive the appropriate diesel traits and add the appropriate ssbh_lib types as parameters for the ::new method. It should be possible to use diesel cli to infer the schema code from an existing database, including foreign keys.