Open inkstak opened 1 year ago
For those in the same situation, my current workaround is to monkey-patch Fx::SchemaDumper::Trigger
# config/initializers/fx.rb
module Fx
module SchemaDumper
module Trigger
private
def dumpable_triggers_in_database
@_dumpable_triggers_in_database ||= Fx.database.triggers
.reject { |trigger| trigger.name == "layer_integrity_checks" }
end
end
end
end
EDIT: after upgrading to 0.9.0, the monkey-patch has changed:
# config/initializers/fx.rb
module Fx
module SchemaDumper
private
def dumpable_triggers_in_database
@dumpable_triggers_in_database ||= Fx.database.triggers
.reject { |trigger| trigger.name == "layer_integrity_checks" }
end
end
end
I'd entertain a PR that expands the sql used to dump triggers to exclude stuff from postgis.
We start using Fx on a database using PostGIS.
When performing
rails db:schema:dump
, fx is dumping a trigger from the topology extension:After then, any
rails db:schema:load
will fail.The trigger is dumped by the statement defined in (..)/adapters/postgres/triggers.rb :
I tried but couldn't find a way to link triggers to namespaces to include only "public" triggers as is done for functions.