implement method for automatic migrations