made psql script compatible with migrations or generate_config reruns