timescaledb
timescaledb copied to clipboard
create_continuous_aggregate not reversible from AR migration
I tried to run rake db:migrate:down VERSION=xxx on a AR migration that used create_continuous_aggregate and it just tried to run create_continuous_aggregate again instead of dropping it.
It should either work, or it should raise irreversible migration error.
Further drop_continuous_aggregate did not exist, but drop_continuous_aggregate does exist. Turns out alias_method entry is missing for drop_continuous_aggregate. https://github.com/timescale/timescaledb-ruby/blob/81d2f97ed5033fa0aea6bd15940db8a5aaa57272/lib/timescaledb/migration_helpers.rb#L126
Thanks for reporting it @intermittentnrg. I see you have the draft in progress, I am looking forward to reviewing the PR 🚀