set up database to current state