Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.8] Add insert ignore support #29639

Merged
merged 1 commit into from
Aug 19, 2019
Merged

[5.8] Add insert ignore support #29639

merged 1 commit into from
Aug 19, 2019

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