Skip to content

Commit ca343f6

Browse files
committed
Create necessary index
1 parent fb03b61 commit ca343f6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/QueryTest.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
use BadMethodCallException;
88
use DateTimeImmutable;
9+
use Illuminate\Support\Facades\Schema;
910
use LogicException;
1011
use MongoDB\BSON\Regex;
1112
use MongoDB\Laravel\Eloquent\Builder;
@@ -44,7 +45,7 @@ public function setUp(): void
4445

4546
public function tearDown(): void
4647
{
47-
User::truncate();
48+
User::delete();
4849
Scoped::truncate();
4950
Birthday::truncate();
5051

@@ -576,6 +577,9 @@ public function testPaginateDistinct(): void
576577

577578
public function testPaginateNear(): void
578579
{
580+
Schema::table('users', function ($table) {
581+
$table->geospatial('position', '2dsphere');
582+
});
579583
User::insert([
580584
['name' => 'Store A', 'position' => [9.224596977233887, 52.03082275390625]],
581585
['name' => 'Store B', 'position' => [9.224596977233887, 52.03082275390625]],

0 commit comments

Comments
 (0)