Update database to define deletion behaviour (#487)