Skip to content

Support Percona migrations #77

@nielsreijers

Description

@nielsreijers

We often do long running MySql migrations using Percona's pt-online-schema-change tool.

For example, when adding a new nullable column, Percona first creates a temporary table, adds the new column, and copies over all the data with triggers to keep the original and new copy in sync. It then renames the temporary table to the original table name, and the original to an _old, which is then dropped.

Doing this on a database that was being replicated to ClickHouse revealed these two issues:

  • alter table checks if the table name matches the config, but does so before stripping off the back ticks with strip_sql_name. Since I didn't have a wildcard in my config, it just skipped the ALTER TABLE completely.
  • RENAME TABLE isn't supported yet.

I'll open a PR to fix these

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions