Skip to content

Commit

Permalink
Merge branch '5.0' into PHPORM-235
Browse files Browse the repository at this point in the history
  • Loading branch information
GromNaN authored Sep 4, 2024
2 parents 7cb1ac0 + 5f0682f commit eaac03f
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 26 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ All notable changes to this project will be documented in this file.
* **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)
* Remove `MongoFailedJobProvider`, replaced by Laravel `DatabaseFailedJobProvider` by @GromNaN in [#3122](https://github.com/mongodb/laravel-mongodb/pull/3122)
* Remove custom `PasswordResetServiceProvider`, use the default `DatabaseTokenRepository` by @GromNaN in [#3124](https://github.com/mongodb/laravel-mongodb/pull/3124)
* Remove `Blueprint::background()` method by @GromNaN in [#3132](https://github.com/mongodb/laravel-mongodb/pull/3132)

## [4.8.0] - 2024-08-27

Expand Down
16 changes: 0 additions & 16 deletions src/Schema/Blueprint.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,22 +177,6 @@ public function unique($columns = null, $name = null, $algorithm = null, $option
return $this;
}

/**
* Specify a non blocking index for the collection.
*
* @param string|array $columns
*
* @return Blueprint
*/
public function background($columns = null)
{
$columns = $this->fluent($columns);

$this->index($columns, null, null, ['background' => true]);

return $this;
}

/**
* Specify a sparse index for the collection.
*
Expand Down
10 changes: 0 additions & 10 deletions tests/SchemaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -245,16 +245,6 @@ public function testHasIndex(): void
});
}

public function testBackground(): void
{
Schema::table('newcollection', function ($collection) {
$collection->background('backgroundkey');
});

$index = $this->getIndex('newcollection', 'backgroundkey');
$this->assertEquals(1, $index['background']);
}

public function testSparse(): void
{
Schema::table('newcollection', function ($collection) {
Expand Down

0 comments on commit eaac03f

Please sign in to comment.