Switch to a settable time format.
Add missing NOT NULLs.
Track whether invoices have been generated for tickets..