Update upgrades YML process with last upgrade

This commit is contained in:
Albert Cervera i Areny 2020-02-07 10:18:03 +01:00
parent cf1fd90e2b
commit 5f821703b4
4 changed files with 10 additions and 3 deletions

3
after/upgrade_country.sh Executable file
View file

@ -0,0 +1,3 @@
#!/bin/bash
./trytond/trytond/modules/country/scripts/import_countries.py -d $1 -c $2

View file

@ -393,7 +393,7 @@ before:
- comment: # Add exceptional parent language (must be run before update
version: 4.8
tables: ir_lang
query: ALTER TABLE ir_lang ADD if not exists parent varchar;
query: ALTER TABLE ir_lang ADD parent VARCHAR;
- comment: # delete register with type 'jasper' on core modules
version: 4.8
@ -680,5 +680,9 @@ after:
version: 4.8
query: DELETE from res_user where login in ('user_cron_purchase_request', 'user_cron_internal_shipment', 'user_cron_production_request', 'user_cron_trigger');
- comment: # upgrade countries/subdivision and locales
script: ./upgrades/after/upgrade_country.sh
version: 5.2
ignore:
- WARNING trytond.backend.postgresql.table Unable to set column move_line of table analytic_account_line not null !

View file

@ -14,6 +14,6 @@ fi
./server.py stop
dropdb $TO_DATABASE
invoke database.copy -o $TO_DATABASE $FROM_DATABASE $TO_DATABASE
export PYTHONPATH=trytond
export PYTHONPATH=trytond:proteus
./upgrades/upgrade $TO_DATABASE $FROM_VERSION
./server.py --no-tail start $TO_DATABASE

View file

@ -15,5 +15,5 @@ fi
#invoke database.drop $TO_DATABASE
dropdb $TO_DATABASE
invoke database.copy $FROM_DATABASE $TO_DATABASE
export PYTHONPATH=trytond
export PYTHONPATH=trytond:proteus
./upgrades/upgrade $TO_DATABASE $FROM_VERSION $OTHER