Fix positions table

This PR adds a check to avoid updating positions table after first phase. It also adds a method for table regeneration. It will run in the console.
indeed, It was my first idea, but this was the fastest. I will move it to a rake task