Preserving dataset history before the CKAN 2.12 revision table removal

If your CKAN portal still holds revision data, that history must move into activities before the 2.12 upgrade. Here is how to check and plan it.

On this page

Why CKAN portal teams must move revision history before upgrading to 2.12

CKAN 2.12 removes the revision table, so any dataset history that exists only there must be migrated to activities before the upgrade. If your portal was created before the activity plugin was enabled, or has ever run with it switched off, older change records may sit only in revision data and could disappear at the upgrade. The supported path runs through the 2.11 line. CKAN 2.12.0 was released on August 26, 2026, together with maintenance releases 2.11.6 and 2.10.11 on the same day. The CKAN releases policy says the latest patch of the current minor version and the previous minor version receive security and bug fixes, so 2.11 is a supported place to stay while you prepare.

Start by establishing where your history actually lives. Confirm with your own database whether the revision tables hold rows that the activity tables do not, and whether the activity plugin is listed in ckan.plugins on every node that has served edits. Compare the date ranges and the dataset counts in both places. Where the two disagree, the gap is your migration scope. Also check whether any extension writes its own change records, because those will not appear in either table. Treat this inventory as a written deliverable that the data owner signs off on, since it defines what history the portal can still show after the move.

Plan the migration as a rehearsal on a copy of production before any change to the live site. Record row counts and sample dataset histories before and after, and keep the database backup from before the rehearsal until the upgrade is verified. Keep the portal on the latest 2.11 patch while you work, because patch releases do not break backwards compatibility and older patches lose support once a newer one ships. Ask the team that runs your portal to confirm the exact migration steps for your installed version in the CKAN documentation, since those steps are the ones your rehearsal must prove.

What changes in CKAN 2.12 that affects dataset history

This table compares the changes in CKAN 2.12 that bear on dataset history. Read each row for what changes, what it means for a portal that still holds revision data, and what to do before upgrading. The main takeaway is that history held only in revision tables should be moved to activities before the 2.12 upgrade, and the Python prerequisite belongs in the same plan.

ChangeImpact on dataset historyAction needed
Revision tables removed in CKAN 2.12History recorded only in revision tables may be unavailable after the upgradeCheck for revision data and migrate it to activities before upgrading to 2.12
Activity stream as the home of historyActivity records may already cover some or all of the history you needConfirm the activity plugin is enabled and check its records against the period you must keep
Minor releases versus patch releasesMinor releases may include backwards-incompatible changes, while patch releases exclude schema changesPlan 2.12 as a minor upgrade with its own test cycle, and confirm schema steps in the release notes
Python 3.10 prerequisiteSource installs require Python 3.10 or newer, so the interpreter must be ready before migration runsConfirm the Python version on test and production hosts and schedule it with the history migration
Release timingCKAN 2.12.0 was released on August 26, 2026, alongside maintenance releases 2.11.6 and 2.10.11 (CKAN GitHub releases)Confirm your current 2.11 patch level so the migration starts from a supported base

How to check whether the activity plugin already holds your history

Portals that never enabled the revision feature usually have little or no legacy revision data to preserve, but you still need to confirm it rather than assume it. Start by checking the configuration of the running site and the plugin list in the CKAN configuration file, since the ckan.plugins key shows whether the activity plugin is loaded at all. Then inspect the database itself, because a configuration change made years ago may not match what was once stored.

  • Plugin list: Confirm that ckan.plugins in the production configuration does not include the revision-related plugin, and check the configuration of every environment, not only production.
  • Database tables: Look for the revision tables in the CKAN PostgreSQL database and check whether they contain rows. Empty tables are a positive result for this tab.
  • Admin interface: In the sysadmin dashboard, open a sample of older datasets and confirm that no revision history or change log entries appear.
  • Backup history: Ask whether any restored or cloned database came from a period when revisions were enabled, since that copy may carry data the live site no longer shows.
  • Stop condition: If the tables hold rows, or the configuration history is unclear, treat the portal as belonging to the next tab and stop before upgrading.

A positive result is an empty revision table in every environment and a configuration history you can explain. Record both in your upgrade notes before moving on.

Migrating revision data to activities in order

This sequence moves dataset history from the legacy revision tables into the activity stream, checks the result against live data, and then upgrades CKAN with a rollback point before each change. The output is a portal that keeps its edit history on 2.12 and a record of every check that proved it.

  1. Inventory revision data and activity plugin state

    Your platform team, working with the portal owner, records the CKAN version in production, whether the activity plugin is enabled, and whether the revision tables still contain rows. Confirm the table names and the count queries in the CKAN docs for your exact release before running them, since command names and schema details can change between versions. Check the extension versions in use and note any that depend on revision data. The step is done when you have a written inventory showing which datasets have revision history only, activity history only, or both. If the activity plugin has been running since before the revision data stopped being written, the gap may be small, and the inventory will show it.

  2. Take a verified copy of the production database

    Your database administrator takes a full backup of the production PostgreSQL database and restores it to a separate server that is not reachable by users or harvesters. Confirm the restore completes and that the row counts for the package, revision and activity tables match the source. Also copy the configuration files and the file storage location so the restored copy behaves like production. This copy is the first rollback point: if any later step fails, production remains untouched and the restored copy is the reference for comparison. Record the backup identifier and the time it was taken.

  3. Run the migration in a separate environment

    Your platform team runs the revision-to-activity migration against the restored copy, using the tooling and command names documented for your current CKAN version. Confirm the exact command and its options in the CKAN docs before running it, and capture the full output and any warnings. Run it on a non-production instance first if the restored copy is itself the only test target. The step is complete when the command finishes without errors and the log records how many revisions were processed and how many were skipped. Keep the logs with the backup identifier so the run can be repeated.

  4. Verify dataset counts and recent edits

    Your data team compares dataset counts in the search index with the package table on the migrated copy, then picks a sample of datasets edited in the last period and checks that each edit appears in the activity stream with the right user, timestamp and dataset. Include deleted and private datasets, since these are the most common gaps. Flag any mismatch, and investigate before continuing. The step is done when the counts match and the sample passes, with the results written down. Any dataset that cannot be matched should be listed as an open exception with an owner.

  5. Upgrade to CKAN 2.11 with a rollback point

    Your platform team takes a fresh backup of the verified copy, then applies the upgrade to 2.11 on a staging environment built from that copy. Follow the upgrade guide for your starting version and confirm each command against the CKAN docs. Run the smoke tests you use for the portal: sign-in, dataset search, dataset edit, resource upload, and the activity stream on a sample dataset. The step is complete when the staging portal passes those checks and the migration checks from the previous step still hold. Treat the backup taken before this change as the rollback point for this stage.

  6. Upgrade to CKAN 2.12 with a rollback point

    Once 2.11 is stable in staging, your platform team takes another backup and applies the 2.12 upgrade on the same staging environment. Check the extension compatibility table for each installed extension before this step, because a 2.12 upgrade can break extension forms and removed helpers. Rerun the verification from the earlier step, including the dataset counts and the recent-edit sample, and compare the results to the inventory. The step is done when the 2.12 staging portal passes both the smoke tests and the verification checks. The backup taken before this change is the rollback point for this stage, and it must be kept until production has been stable for a period your team has agreed.

  7. Repeat the sequence on production

    Schedule the production change using the same commands, logs and checks used in staging, and do not run any command in production that was not already run in staging. Take a final backup immediately before the change window, which becomes the production rollback point. Run the upgrade, then the verification checks, and record the results against the staging results. Confirm with the portal owner that the outcome matches what was agreed. The sequence is complete when production passes the smoke tests, the verification sample matches, and the rollback point and logs are archived with the change record.

What to back up and prepare before the migration

Preserving dataset history is only safe if the source data is recoverable and the upgrade is rehearsed first. The cards below cover what to back up, what to test, and what to sign off before the revision data is touched on a production portal.

Full PostgreSQL backup and restore test

Take a full backup of the CKAN database and restore it to a separate server before any migration step runs. The restore is the proof: confirm that the revision and revision_table data is present, that row counts match the source, and that CKAN starts against the restored copy. Keep the backup until the new portal has run in production for a period you agree with your owners. A backup that has never been restored is an assumption, not a safety net.

DataStore docs

Inventory of installed extensions

List every extension in the plugins setting and check each one against CKAN 2.12. Record the version each one runs, whether its repository states support for 2.12, and whether it reads revision tables or the revision helpers. Extensions that stopped at an older release need a replacement plan or a fork before the upgrade. Ask the maintainers of any custom extension to confirm its 2.12 status in writing.

Staging environment built from production data

Build a staging portal from a fresh production dump, on the same CKAN, PostgreSQL, Solr and extension versions as production. Run the revision-to-activity migration there first and time it. Check that dataset pages, activity streams, and the API return the expected history for sample datasets with many edits. Confirm which steps need the site in maintenance mode and how long users will be locked out.

Solr index rebuild planning

Decide whether the search index must be rebuilt after the upgrade and who owns that step. Confirm the Solr version and schema that the target CKAN release expects, and test the rebuild on staging so you know how long search will be degraded for users. Plan the sequence so that dataset history pages and search do not both fail during the same window.

Custom templates and helper dependencies

Search your themes and extensions for calls to revision-related helpers, revision views, and any template that renders revision links or diffs. Each match must be removed, replaced with the activity equivalent, or covered by a test on staging. Record the templates you changed so that the change list can be reviewed alongside the upgrade.

Sign-off criteria for dataset history

Agree in writing who approves the migration and what counts as complete. Typical criteria include matching record counts for datasets with revisions, sample datasets whose history reads correctly in the activity stream, no unexpected errors in logs during a full test run, and a tested rollback path to the backup. Store the test results with the change record so that auditors and data owners can see what was checked.

How revision data moves into the activity stream before the upgrade

The diagram starts with the production database, which is copied to a pre-migration backup before anything changes. That backup is restored into a staging copy, where the revision-to-activity migration runs and its output is checked against the activity stream. Only after the check passes does the staging result move on to the CKAN 2.11 upgrade and then the CKAN 2.12 upgrade. Each gate has a dotted rollback path to the backup, so a failed step can return the portal to its last known state.

Revision data moves through staging, with a rollback to backup at each gate.

What makes the history migration longer or riskier

This table lists the factors that change how much work moving revision data into activities takes and how much risk it carries. Read each row as a question to put to a partner or to your own team: the direction shows whether a factor pushes effort up or down, and the last column names what to ask for in a written quote. Most of the scope comes from the data volume, the extensions touching history, and the restore test.

DriverEffect on effort and riskWhat to ask for in a quote
Volume of revision rows and datasetsMore rows and datasets increase migration run time, verification work and the window in which the portal must be frozen or staged.A stated count of revision rows and datasets from your own query, and the migration approach chosen for that volume
Extensions that touch dataset historyEach extension that reads or writes revisions, activities or dataset history adds compatibility checks and may need its own changes before the upgrade.A list of every installed extension that references history, with the target version each one supports
Custom activity or audit codeSite-specific code that writes audit records or queries revision tables is outside standard migration paths and must be rewritten and tested.A review of local code that uses revision or activity data, with a clear statement of what will be changed
Age of the installed CKAN versionOlder portals may carry more schema history and older extension versions, so the gap to the target release is wider and more steps may be needed.The current installed version, the planned path to 2.12, and any intermediate upgrade steps included in the price
Number of environments kept in stepEach environment (development, test, staging, production) needs the same migration run and checks, and drift between them is a common source of surprises.Which environments are covered, how configuration is kept identical, and how the sequence of runs is documented
Quality of the backup and restore testA backup that has never been restored to a separate system gives little assurance. A tested restore lowers risk, but it adds time for setup and repeated runs.Evidence of a restore test on a copy of production, the recovery time you observed, and what is included in the rollback plan

Questions teams ask before migrating CKAN revision history

Can our own team migrate CKAN revision history without a partner?

Yes, a team can do it in-house if it has people who can read CKAN release documentation, work with the portal's database, and test changes in a copy of production. The work is mostly careful analysis and verification, not a large build. The deciding factors are whether your operators have handled CKAN database changes before, whether you have a staging environment that mirrors production, and whether anyone has time to own the cutover. Confirm the migration method, its prerequisites and its supported steps with the CKAN release policy documentation and the release notes for your target version before choosing an approach.

What drives the cost of a CKAN revision history migration?

Cost follows the hours spent by each role, plus any infrastructure needed to test. The main components are analysis of what revision data exists and whether the activity plugin already holds it, scripting or a supported procedure, test runs against a production-like copy, the production cutover, and verification with sign-off. Most of this is one-time work, but backup storage and staging environments may recur for as long as you keep them. Costs rise with the number of portals and extensions, the size and age of the data, and the number of environments. Ask any provider for a written scope that names each deliverable, the environments covered, who runs each step, how verification is recorded, and what is excluded.

How long does a CKAN revision history migration take?

Duration depends on how much revision data the portal holds, how much of it the activity plugin already covers, and how many environments must be migrated and tested. A portal with a small, clean history and one environment will move faster than a long-lived portal with several extensions, custom code and multiple sites. The schedule also depends on your change window, approval steps, and how long verification takes on a copy of production. Plan the timeline from the test runs rather than from the expected production run, because the test results show how much data is involved and where problems appear. Ask for the timeline to be tied to named milestones in the written scope.

What does the migration need from the portal owner and the database administrator?

The portal owner decides scope, acceptance criteria and the change window, and signs off that the migrated history is complete enough for the portal's purposes. The database administrator handles backups, access, storage capacity and the database-side steps. Typical inputs include:

  • A current, tested backup of the CKAN database and any DataStore databases, taken before any change
  • A staging copy of production with the same CKAN version, extensions and database size
  • Database credentials and maintenance access for the window, with a named owner for each step
  • Confirmation of which extensions, including the activity plugin, are enabled in production
  • A decision on how long old data is kept after the migration
Can a failed CKAN revision history migration be rolled back?

A failed migration can be rolled back only if a verified backup exists that was taken before the change and that has been restored successfully in a test environment. Rollback is therefore a planning requirement, not a fallback you find at the time of failure. Before the window, confirm the restore procedure, the time it takes, who can authorize it, and how the portal will be checked after a restore. Keep the old database available until the migrated data has been verified against the list of records the portal must keep. Confirm the exact rollback steps for your CKAN version and database setup with the CKAN documentation and your database administrator.

Does migrating revision history satisfy audit or records requirements?

A migration preserves change history in the activity data, but it does not by itself satisfy any audit or records obligation. Whether the preserved history meets a requirement depends on your records policy, the rules your regulator or governing body applies, and what an auditor decides is sufficient. DeployOpen prepares systems, controls and evidence for compliance assessments, including documented migration steps, verification results and backup records, but it does not issue audit reports, attestations or certifications. Confirm with your compliance team which records must be kept, how long, and what evidence the auditor will request, then build the verification plan around those answers.

How DeployOpen scopes and delivers a CKAN history migration

DeployOpen treats preserving dataset history as a scoped piece of CKAN work, not a side task inside the 2.12 upgrade. We start by confirming what history your portal holds and where it lives, then build and test the migration in a separate environment before anything touches production.

How we scope

  • Inventory which datasets and revision records exist, and whether the activity plugin already recorded their history.
  • Confirm the target CKAN version and the environments the migration must run in, such as staging and production.
  • Agree the scope in writing before work starts, since most engagements are fixed-scope with deliverables and timelines defined up front.

How we build

  • Run the revision-to-activity migration against a copy of your database and review what carries over and what does not.
  • Compare record counts and sample dataset histories before and after the run, and document every gap found.
  • Pair the history work with the rest of the 2.11 to 2.12 upgrade plan so the migration and the upgrade are sequenced together.

How we hand over

  • Deliver a runbook with the exact steps, checks, rollback points and the order of operations for your environment.
  • Provide a verification record showing how the migrated history was checked, so your team can review it later.
  • Walk your operators through the procedure so they can repeat it on any future environment without outside help.

How we support

  • Offer ongoing support, upgrades and continuous testing as a retainer if your portal needs help after the migration.
  • Confirm with us whether retainer coverage will include follow-up checks on activity data during the upgrade window.
  • Ask for a written quote that lists scope, deliverables and any recurring support items separately from the one-time migration work.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.