Ignores no_returning
9mm opened this issue · 0 comments
9mm commented
rows = fired.map{|f| {
"identifier_id" => f.dig("identifier", "id"),
"trigger_id" => f.dig("trigger", "id"),
}}
FiredTrigger.import(rows,
validate: false,
validate_uniqueness: false,
track_validation_failures: false,
timestamps: false,
raise_error: true,
no_returning: true, # ignores this for some reason...
)
I have tried every conceivable way to get it to STOP adding RETURNING "id"
including what you see above, as well as
returning: nil
, returning: []
It ignores everything, and always adds it.
I have also tried this:
FiredTrigger.import(rows,
no_returning: true, # ignores this for some reason...
)
class CreateFiredTriggers < ActiveRecord::Migration[7.1]
def change
create_table :fired_triggers do |t|
t.references :identifier, null: false
t.references :trigger, null: false
t.datetime :fired_at, null: false, default: -> { "CURRENT_TIMESTAMP" }
end
add_index :fired_triggers, :fired_at
end
end