DB: add more parent table altering functions.

Also associated tests.