Skip to content

ActiveRecord::ConnectionAdapters::SQLServerAdapter does not support skipping duplicates #847

Closed
@Quintasan

Description

@Quintasan

Issue

bundle exec rails db:seed throws ActiveRecord::ConnectionAdapters::SQLServerAdapter does not support skipping duplicates.

Expected behavior

A single SQL INSERT should be generated and executed

Actual behavior

When using #insert_all(Array[Hash]) I'm getting ActiveRecord::ConnectionAdapters::SQLServerAdapter does not support skipping duplicates

How to reproduce

ENTRIES = [{name: "Test"}]
ENTRIES_DATA = ENTRIES.map { |e| e.merge(created_at: Time.zone.now, updated_at: Time.zone.now) }
Model.insert_all(ENTRIES_DATA)

Details

  • Rails version: Rails 6.0.3.4
  • SQL Server adapter version: 6.0.0
  • TinyTDS version: 2.1.3
  • FreeTDS details: 1.1.6-1ubuntu0.1
Compile-time settings (established with the "configure" script)
                            Version: freetds v1.1.6
             freetds.conf directory: /etc/freetds
     MS db-lib source compatibility: no
        Sybase binary compatibility: yes
                      Thread safety: yes
                      iconv library: yes
                        TDS version: auto
                              iODBC: no
                           unixodbc: yes
              SSPI "trusted" logins: no
                           Kerberos: yes
                            OpenSSL: no
                             GnuTLS: yes
                               MARS: yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions