jonnybarnes.uk/database/migrations/2015_11_07_130637_create_places_table.php

36 lines
771 B
PHP
Raw Normal View History

2016-05-19 15:01:28 +01:00
<?php
2020-06-13 16:32:42 +01:00
use MStaack\LaravelPostgis\Schema\Blueprint;
2016-05-19 15:01:28 +01:00
use Illuminate\Database\Migrations\Migration;
class CreatePlacesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('places', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('slug')->unique();
$table->text('description')->nullable();
$table->point('location');
$table->polygon('polygon')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('places');
}
}