Add database linkages to master creation/deletion
All master operations other than deploy keys are linked to the db
All pretty hacky, but registers in the db