upgrade database (constraints)