Created
April 2, 2020 06:51
-
-
Save mstaack/91fd45bd7ebc755eb3a1f789aca74f2b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use App\Models\Mongo\Venue; | |
use Illuminate\Database\Migrations\Migration; | |
class VenueIndiciesMigration extends Migration | |
{ | |
/** | |
* Run the migrations. | |
* | |
* @return void | |
*/ | |
public function up() | |
{ | |
Venue::truncate(); | |
Schema::connection('mongodb')->create('venues', function ($collection) { | |
$collection->geospatial('location', '2dsphere'); | |
}); | |
} | |
/** | |
* Reverse the migrations. | |
* | |
* @return void | |
*/ | |
public function down() | |
{ | |
// | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment