You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
I have tried every conceivable way to get it to STOP adding
RETURNING "id"
including what you see above, as well asreturning: nil
,returning: []
It ignores everything, and always adds it.
I have also tried this:
The text was updated successfully, but these errors were encountered: