postgresql migration part 1