Skip to content

Conversation

@dunhamjared
Copy link
Contributor

@dunhamjared dunhamjared commented Aug 19, 2019

Per @taylorotwell, removed SQL Server support.

This pull request adds insert or ignore support to the query builder for the following database engines:

MySQL - uses: insert ignore
Postgres - uses: on conflict do nothing
SQLite - uses: insert or ignore
SqlServer - not supported, throws RuntimeException

Example:

DB::table('test')->insertOrIgnore([['id'=>1], ['id'=>2]]);

Related issue: #9612
Original pull: #29572
Fixes: laravel/ideas#1762

@driesvints driesvints changed the title Add insert ignore support [5.8] Add insert ignore support Aug 19, 2019
@taylorotwell taylorotwell merged commit ca15be4 into laravel:5.8 Aug 19, 2019
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

Successfully merging this pull request may close these issues.

Add INSERT IGNORE support to Query Builder

2 participants