Files
0k-odoo-upgrade/18.0/pre_upgrade.sh
Stéphan Sainléger afeaa3d00f [IMP] fix the issue of account_analytic_plan migration in v17
Should be great to understand the origin of the problem one day...
2026-01-12 17:08:43 +01:00

20 lines
477 B
Bash
Executable File

#!/bin/bash
echo "Prepare migration to 18.0..."
# Copy database
copy_database ou17 ou18 ou18 || exit 1
# Execute SQL pre-migration commands
PRE_MIGRATE_SQL=$(cat <<'EOF'
UPDATE account_analytic_plan SET default_applicability=NULL WHERE default_applicability='optional';
EOF
)
echo "SQL command = $PRE_MIGRATE_SQL"
query_postgres_container "$PRE_MIGRATE_SQL" ou18 || exit 1
# Copy filestores
copy_filestore ou17 ou17 ou18 ou18 || exit 1
echo "Ready for migration to 18.0!"