Deals with tables with composite primary key - #7
Conversation
|
Sorry, tests failed... |
|
Thank you for this PR and for raising composite primary key support — it's a genuinely useful capability. We've implemented it in #55, which reimplements your approach on the current codebase (the plugin has diverged quite a bit since 2015). and the combination is used both for change detection and for the Elasticsearch document While porting your idea, we also kept a fix for a small bug in the original change here: the update branch read Once #55 is merged this PR will be superseded. Thanks again — your PR is what drove the feature. 🙏 |
Bump the gem version to 1.3.0 and add the CHANGELOG entry. 1.3.0 is a minor release adding two backward-compatible features since 1.2.0: - Date-based Elasticsearch index names via strftime tokens in the tag (#27). - Composite primary key support in mysql_replicator (#7). Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
In our project, the tables that we wanted to export to Elasticsearch don't have a single column primary key, so the plugin couldn't be used because it doesn't allow composite ones, so I did a quick fix to allow them and it seems working in our environment.
I'm not sure this feature is of use to anyone, but who knows? So I'm sending this PR.
I'm not a Ruby programmer, so any suggestions as to the coding style etc. would be appreciated.
Thanks.