I've read the documentation and been able to find anything to assist me so far. I've also read a large number of blog articles, but nothing seems to answer my question directly:
Is it possible to manage table partitions in an InnoDB table with ActiveRecord? I'd really prefer to keep things very clean and I'm trying to avoid writing external scripts to try to automate the creation/deletion of partitions over time.
Yes, you can! But I don't think that there is a gem that will do it for you.
In order to perform partition management you need to do the hard work by yourself and send the command that you need to run on the DB directly via the connection in the following way
ActiveRecord::Base.connection.execute("ALTER TABLE your_table drop partition p0")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With