WiP: fix the database creation