teoljungberg / fx

Versioned database functions and triggers for Rails
MIT License
763 stars 77 forks source link

Ruby 3 support #65

Closed incubus closed 3 years ago

incubus commented 3 years ago

Hi!

drop_trigger does not work with Ruby 3. Unfortunately, I couldn't make a quick fix for this.

== 20210214133450 CreateTriggerUpdateOrderSubtotal: reverting =================
-- drop_trigger(:update_order_subtotal, {:on=>:orders_items})
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:

wrong number of arguments (given 2, expected 1; required keyword: on)

Caused by:
ArgumentError: wrong number of arguments (given 2, expected 1; required keyword: on)

Tasks: TOP => db:rollback
(See full trace by running task with --trace)

Thanks!

teoljungberg commented 3 years ago

Yeah that's definitely a problem, and one I would like to see fixed.

teoljungberg commented 3 years ago

As you expressed wanting to help @pjungwir - is this something you can help get over the finish line?

pjungwir commented 3 years ago

I'd be happy to work on this! I want to add Ruby 3 to our Travis/Appraisal files too.

teoljungberg commented 3 years ago

See https://github.com/teoljungberg/fx/pull/70 for starters @pjungwir, and if there's anything we ought to re-use.

pjungwir commented 3 years ago

This should be fixed by https://github.com/teoljungberg/fx/pull/76.

teoljungberg commented 3 years ago

Done as of #76 .