There are really two parts to this: finding what schema changes happened between versions, and then the practical approach to comparing and potentially reverting. Let me address both.
1. Finding the migration changes between v2.8.2 and v2.10.1
With any new AtoM release that includes changes to the database, a schema migration script is included that makes the necessary changes to conform to the expected schema. During the upgrade process, these migration scripts are executed when the upgrade task is run (AtoM) — specifically via php symfony tools:upgrade-sql.
The migration scripts live in the AtoM source code under lib/task/migrate/ (the arUpgradeSqlTask class). Each migration is a numbered PHP class that runs sequentially. You can inspect the actual SQL changes by looking at the AtoM GitHub repo and comparing the two branches:
Browse lib/task/migrate/migrations/ between the stable/2.8.x and stable/2.10.x branches
Any migration class numbered higher than what existed in 2.8.2 represents a schema change introduced after that release
Artefactual has consistently avoided including database schema migrations in point releases (GitHub) , meaning v2.8.0 → v2.8.2 likely had zero schema changes. The schema differences will be concentrated in the 2.9.0 and 2.10.0 major releases.
2. Comparing two MySQL instances directly
This is the more practical approach — rather than trying to trace individual migrations, just diff the schemas directly. Several methods work well:
Option A: mysqldump schema-only comparison (simplest, no extra tools)
# Dump schema only from your v2.10.1 instance
mysqldump -u root -d atom_v210 > /tmp/schema_v210.sql
# Dump schema only from a v2.8.2 reference instance
mysqldump -u root -d atom_v282 > /tmp/schema_v282.sql
# Diff them
diff /tmp/schema_v282.sql /tmp/schema_v210.sql > /tmp/schema_changes.diff
The -d flag dumps structure only (no data). The diff output will show you every column addition, table creation, index change, etc. It's noisy because of auto-increment values and ordering, but it's comprehensive.
Option B: mysql-schema-diff (generates executable ALTER statements)
mysql-schema-diff compares the data structures of two MySQL databases and returns the differences as a sequence of MySQL commands (User Guide) that can transform one schema into the other. This is extremely useful for your use case because the output is directly usable for reverting:
# Install on Ubuntu
sudo apt-get install libmysql-diff-perl
# Compare: this generates SQL to transform v2.10 BACK to v2.8
mysql-schema-diff --host=localhost --user=root \
--password='' db:atom_v210 db:atom_v282 > /tmp/downgrade.sql
The output gives you the exact ALTER TABLE, DROP TABLE, DROP COLUMN statements needed. Obviously review carefully before applying.
Option C: DBDiff (PHP-based, does schema AND data)
DBDiff compares two databases, local or remote, and produces a migration file of the differences automatically, including up and down SQL (DBDiff) . Since it's PHP-based, it runs natively in your AtoM environment:
composer global require dbdiff/dbdiff
dbdiff server1.atom_v282:server2.atom_v210 --type=schema
3. Practical downgrade strategy
Here's what I'd actually recommend for a safe approach:
Before anything, take a full backup of your current v2.10.1 database and files:
mysqldump -u root atom > /tmp/atom_v210_full_backup_$(date +%Y%m%d).sql
Set up a reference v2.8.2 instance — spin up a clean AtoM 2.8.2 installation (even a temporary VM) with a fresh database. This gives you a known-good v2.8.2 schema to compare against.
Run the schema comparison using one of the methods above. Focus on identifying:
New tables added in 2.10 (these can likely just be dropped)
New columns added to existing tables (these may contain data you want to preserve)
Changed column types or constraints (these are the trickiest to revert)
Index changes
The hard part: finding aids, cached XML, and digital objects are not stored in the database — these are found in the uploads and downloads directories (AtoM) . So your data preservation concern is mainly about the relational data in MySQL, plus those file directories.
Important caveat: AtoM doesn't officially support downgrades. The tools:upgrade-sql migrations are one-directional — there's no built-in tools:downgrade-sql. Even if you revert the schema, the v2.8.2 codebase may expect data in formats that the 2.10.x migrations transformed. For example, if a migration moved data from one table to another or changed how values are encoded, just reverting the schema won't undo those data transformations.
The safest downgrade path is usually: restore a pre-upgrade database backup (you did take one before upgrading, right?), then re-import only the new/changed records created since the upgrade. This preserves data integrity far better than trying to reverse-engineer migration rollbacks.
Hope that helps — and yes, always take backups before major version upgrades. That pre-upgrade snapshot is worth its weight in gold in situations like this.
Johan Pieterse
082 337-1406