[IMP] update all script paths for new directory structure

Update all path references to match the new directory layout:

upgrade.sh:
  - ./prepare_db.sh -> ${SCRIPT_DIR}/scripts/prepare_db.sh
  - ./finalize_db.sh -> ${SCRIPT_DIR}/scripts/finalize_db.sh
  - ${SCRIPT_DIR}/${version}.0/ -> ${SCRIPT_DIR}/versions/${version}.0/

scripts/prepare_db.sh:
  - pre_migration_view_checking.py -> ${SCRIPT_DIR}/lib/python/check_views.py

scripts/finalize_db.sh:
  - post_migration_fix_duplicated_views.py -> ${SCRIPT_DIR}/lib/python/fix_duplicated_views.py
  - post_migration_cleanup_obsolete_modules.py -> ${SCRIPT_DIR}/lib/python/cleanup_modules.py

versions/*/upgrade.sh:
  - ../compose.yml -> ../../config/compose.yml
This commit is contained in:
Stéphan Sainléger
2026-02-02 22:11:15 +01:00
parent 245ddcc3f9
commit 8d2b151a85
9 changed files with 18 additions and 16 deletions

View File

@@ -34,14 +34,15 @@ EOF
)
query_postgres_container "$CLEANUP_SQL" "$DB_NAME"
PYTHON_SCRIPT=post_migration_fix_duplicated_views.py
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
PYTHON_SCRIPT="${SCRIPT_DIR}/lib/python/fix_duplicated_views.py"
echo "Remove duplicated views with script $PYTHON_SCRIPT ..."
exec_python_script_in_odoo_shell "$DB_NAME" "$DB_NAME" "$PYTHON_SCRIPT"
# Uninstall obsolete add-ons
PYTHON_SCRIPT=post_migration_cleanup_obsolete_modules.py
PYTHON_SCRIPT="${SCRIPT_DIR}/lib/python/cleanup_modules.py"
echo "Uninstall obsolete add-ons with script $PYTHON_SCRIPT ..."
exec_python_script_in_odoo_shell "$DB_NAME" "$DB_NAME" "$PYTHON_SCRIPT" || exit 1
exec_python_script_in_odoo_shell "$DB_NAME" "$DB_NAME" "$PYTHON_SCRIPT"
# Give back the right to user to access to the tables
# docker exec -u 70 "$DB_CONTAINER_NAME" pgm chown "$FINALE_SERVICE_NAME" "$DB_NAME"