diff --git a/config/compose.yml b/config/compose.yml index 38591ce..92a494b 100644 --- a/config/compose.yml +++ b/config/compose.yml @@ -102,6 +102,20 @@ ou19: options: workers: 0 +ou20: + charm: odoo-tecnativa + docker-compose: + image: docker.0k.io/mirror/odoo:rc_20.0-ELABORE-LIGHT + ## Important to keep as a list: otherwise it'll overwrite charm's arguments. + command: + - "--log-level=debug" + - "--limit-time-cpu=1000000" + - "--limit-time-real=1000000" + volumes: + - /home/stephan/dev/Odoo/0k-odoo-upgrade/versions/20.0/addons/:/opt/odoo/auto/mig:rw + options: + workers: 0 + postgres: docker-compose: image: docker.0k.io/postgres:17.2.0-myc diff --git a/versions/20.0/known_changes.yaml b/versions/20.0/known_changes.yaml new file mode 100644 index 0000000..89758af --- /dev/null +++ b/versions/20.0/known_changes.yaml @@ -0,0 +1,8 @@ +# Modules that became obsolete in version 20.0 +obsolete: [] + +# Modules merged into Odoo Core in version 20.0 +merged_in_core: [] + +# Modules renamed in version 20.0 +renamed: [] diff --git a/versions/20.0/post_upgrade.sh b/versions/20.0/post_upgrade.sh new file mode 100755 index 0000000..1ab7e98 --- /dev/null +++ b/versions/20.0/post_upgrade.sh @@ -0,0 +1,7 @@ +#!/bin/bash +set -euo pipefail + +echo "Post migration to 20.0..." + + +echo "Post migration to 20.0 completed!" diff --git a/versions/20.0/pre_upgrade.sh b/versions/20.0/pre_upgrade.sh new file mode 100755 index 0000000..8f46401 --- /dev/null +++ b/versions/20.0/pre_upgrade.sh @@ -0,0 +1,20 @@ +#!/bin/bash +set -euo pipefail + +echo "Prepare migration to 20.0..." + +# Copy database +copy_database ou19 ou20 ou20 || exit 1 + + +# Execute SQL pre-migration commands +PRE_MIGRATE_SQL=$(cat <<'EOF' +EOF +) +echo "SQL command = $PRE_MIGRATE_SQL" +query_postgres_container "$PRE_MIGRATE_SQL" ou20 || exit 1 + +# Copy filestores +copy_filestore ou19 ou19 ou20 ou20 || exit 1 + +echo "Ready for migration to 20.0!" diff --git a/versions/20.0/upgrade.sh b/versions/20.0/upgrade.sh new file mode 100755 index 0000000..9236de8 --- /dev/null +++ b/versions/20.0/upgrade.sh @@ -0,0 +1,11 @@ +#!/bin/bash +set -euo pipefail + +# --upgrade-path lists BOTH our custom migration scripts and OpenUpgrade's +# native ones. Passing --upgrade-path overrides config['upgrade_path'], and +# openupgrade_framework only sets that default when it is empty; so we must +# include the native openupgrade_scripts/scripts path explicitly, otherwise the +# native migration scripts would no longer run. Odoo appends every listed path +# to odoo.upgrade.__path__ and concatenates (does not override) the scripts +# found per module/version, so our script runs IN ADDITION to the native ones. +run_compose run -p 8020:8069 ou20 --config=/opt/odoo/auto/odoo.conf --stop-after-init -u all --workers 0 --log-level=debug --max-cron-threads=0 --limit-time-real=10000 --database=ou20 --load=base,web,openupgrade_framework --addons-path=/opt/odoo/auto/mig,/opt/odoo/auto/addons --upgrade-path=/opt/odoo/auto/upgrade,/opt/odoo/auto/addons/openupgrade_scripts/scripts