Skip to content

Commit 5f0682f

Browse files
authored
PHPORM-157 Remove Blueprint::background() (#3132)
1 parent c710097 commit 5f0682f

File tree

3 files changed

+1
-26
lines changed

3 files changed

+1
-26
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ All notable changes to this project will be documented in this file.
88
* **BREAKING CHANGE** Make Query\Builder return objects instead of array to match Laravel behavior by @GromNaN in [#3107](https://github.com/mongodb/laravel-mongodb/pull/3107)
99
* **BREAKING CHANGE** In DB query results, convert BSON `UTCDateTime` objects into `Carbon` date with the default timezone by @GromNaN in [#3119](https://github.com/mongodb/laravel-mongodb/pull/3119)
1010
* Remove `MongoFailedJobProvider`, replaced by Laravel `DatabaseFailedJobProvider` by @GromNaN in [#3122](https://github.com/mongodb/laravel-mongodb/pull/3122)
11+
* Remove `Blueprint::background()` method by @GromNaN in [#3132](https://github.com/mongodb/laravel-mongodb/pull/3132)
1112

1213
## [4.8.0] - 2024-08-27
1314

src/Schema/Blueprint.php

-16
Original file line numberDiff line numberDiff line change
@@ -177,22 +177,6 @@ public function unique($columns = null, $name = null, $algorithm = null, $option
177177
return $this;
178178
}
179179

180-
/**
181-
* Specify a non blocking index for the collection.
182-
*
183-
* @param string|array $columns
184-
*
185-
* @return Blueprint
186-
*/
187-
public function background($columns = null)
188-
{
189-
$columns = $this->fluent($columns);
190-
191-
$this->index($columns, null, null, ['background' => true]);
192-
193-
return $this;
194-
}
195-
196180
/**
197181
* Specify a sparse index for the collection.
198182
*

tests/SchemaTest.php

-10
Original file line numberDiff line numberDiff line change
@@ -245,16 +245,6 @@ public function testHasIndex(): void
245245
});
246246
}
247247

248-
public function testBackground(): void
249-
{
250-
Schema::table('newcollection', function ($collection) {
251-
$collection->background('backgroundkey');
252-
});
253-
254-
$index = $this->getIndex('newcollection', 'backgroundkey');
255-
$this->assertEquals(1, $index['background']);
256-
}
257-
258248
public function testSparse(): void
259249
{
260250
Schema::table('newcollection', function ($collection) {

0 commit comments

Comments
 (0)