[IMP] add migration log file

to store all the migration logs. File reset at each migration.
This commit is contained in:
Stéphan Sainléger
2026-06-05 21:33:09 +02:00
parent d2c4ec6de5
commit 7b13382c46
3 changed files with 21 additions and 2 deletions

View File

@@ -413,10 +413,23 @@ The script works on a **copy** of the original database. You can restart as many
### Viewing Detailed Logs
Odoo/OpenUpgrade logs are displayed in real-time. For a problematic migration:
All output (scripts, Docker containers, OpenUpgrade logs) is automatically saved to `migration.log` at the project root. The file is overwritten at the start of each run (full migration or resume).
```bash
# Follow live output while also saving to file (already done automatically)
tail -f migration.log
# Search for errors after the fact
grep -i error migration.log
# View with ANSI colors preserved
less -R migration.log
```
For a problematic migration:
1. Note the version where the error occurs
2. Check the logs to identify the problematic module/table
2. Check `migration.log` to identify the problematic module/table
3. Add a fix in the `pre_upgrade.sh` for that version
4. Restart the migration