Browse Source

[MIG] base_location: Cover case of res_better_zip w/o country_id

12.0
Pedro M. Baeza 5 years ago
parent
commit
88ba7374d7
  1. 3
      base_location/migrations/12.0.1.0.0/post-migration.py

3
base_location/migrations/12.0.1.0.0/post-migration.py

@ -22,8 +22,9 @@ def migrate(env, version):
SELECT
city, state_id, country_id,
MIN(create_uid), MIN(create_date), MIN(write_uid), MIN(write_date)
FROM res_better_zip
FROM res_better_zip rbz
WHERE city_id IS NULL
AND rbz.country_id IS NOT NULL
GROUP BY city, state_id, country_id
ON CONFLICT DO NOTHING""",
)

Loading…
Cancel
Save