diff --git a/config/compose.yml b/config/compose.yml index 59de671..38591ce 100644 --- a/config/compose.yml +++ b/config/compose.yml @@ -88,6 +88,20 @@ ou18: options: workers: 0 +ou19: + charm: odoo-tecnativa + docker-compose: + image: docker.0k.io/mirror/odoo:rc_19.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/19.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/19.0/known_changes.yaml b/versions/19.0/known_changes.yaml new file mode 100644 index 0000000..072319a --- /dev/null +++ b/versions/19.0/known_changes.yaml @@ -0,0 +1,8 @@ +# Modules that became obsolete in version 19.0 +obsolete: [] + +# Modules merged into Odoo Core in version 19.0 +merged_in_core: [] + +# Modules renamed in version 19.0 +renamed: [] diff --git a/versions/19.0/post_upgrade.sh b/versions/19.0/post_upgrade.sh new file mode 100755 index 0000000..750bdc4 --- /dev/null +++ b/versions/19.0/post_upgrade.sh @@ -0,0 +1,7 @@ +#!/bin/bash +set -euo pipefail + +echo "Post migration to 19.0..." + + +echo "Post migration to 19.0 completed!" diff --git a/versions/19.0/pre_upgrade.sh b/versions/19.0/pre_upgrade.sh new file mode 100755 index 0000000..6ffd7c2 --- /dev/null +++ b/versions/19.0/pre_upgrade.sh @@ -0,0 +1,20 @@ +#!/bin/bash +set -euo pipefail + +echo "Prepare migration to 19.0..." + +# Copy database +copy_database ou18 ou19 ou19 || 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" ou19 || exit 1 + +# Copy filestores +copy_filestore ou18 ou18 ou19 ou19 || exit 1 + +echo "Ready for migration to 19.0!" diff --git a/versions/19.0/upgrade.sh b/versions/19.0/upgrade.sh new file mode 100755 index 0000000..10a3f5c --- /dev/null +++ b/versions/19.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 8019:8069 ou19 --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=ou19 --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