1d180acf15
init_db() was only called inside if __name__ == "__main__", which Gunicorn never executes. Tables were never created, causing every request to fail. Move the call to module level so it runs on import, before the autoclose thread starts. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>