updated before script to create the db