Added cloning to database model and methods needed to keep it up to date while the migration operations are processed.

I will add the parameter.