Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hairtrigger broken with fx gem >= 0.6.0 #94

Open
phlegx opened this issue May 5, 2021 · 1 comment
Open

Hairtrigger broken with fx gem >= 0.6.0 #94

phlegx opened this issue May 5, 2021 · 1 comment

Comments

@phlegx
Copy link

phlegx commented May 5, 2021

hairtrigger gem is broken if used in combination with fx gem >= 0.6.0.

$ rake db:migrate
...
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:

unknown keywords: :generated, :compatibility
/home/user/.rvm/gems/ruby-2.7.2@app/gems/fx-0.6.0/lib/fx/statements/trigger.rb:30:in `create_trigger'

It works fine with fx version 0.5.0.

@phlegx
Copy link
Author

phlegx commented May 5, 2021

Meanwhile I have patched the fx code, to disable trigger functionality (because we use only the function functionality of fx):

# config/initializers/fx.rb

module Fx
  # Monkey patch module Function to disable unused trigger functionality.
  module Statements
    # Methods that are made available in migrations for managing Fx triggers.
    module Trigger
      def create_trigger(*args) # rubocop:disable Lint/UselessMethodDefinition
        super
      end

      def drop_trigger(*args) # rubocop:disable Lint/UselessMethodDefinition
        super
      end

      def update_trigger(*args) # rubocop:disable Lint/UselessMethodDefinition
        super
      end
    end
  end
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant