Reduce code complexity
Added dbcheck method to see if table is empty
Moved gallery migration to own step to reduce complexity