Fix database setup