Fix postgres sequences after data migrations.