2016-01-16 00:26:50 +00:00
|
|
|
<?php
|
|
|
|
|
2022-11-25 20:29:04 +00:00
|
|
|
use Illuminate\Support\Facades\Schema;
|
2016-01-16 00:26:50 +00:00
|
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
|
2016-01-23 20:42:25 +00:00
|
|
|
class AddLocations extends Migration
|
2016-01-16 00:26:50 +00:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Run the migrations.
|
|
|
|
*/
|
2022-11-25 20:29:04 +00:00
|
|
|
public function up(): void
|
2016-01-16 00:26:50 +00:00
|
|
|
{
|
2016-01-23 20:42:25 +00:00
|
|
|
Schema::create('locations', function (Blueprint $table) {
|
2016-01-16 00:26:50 +00:00
|
|
|
$table->increments('id');
|
2016-01-23 20:42:25 +00:00
|
|
|
$table->string('short')->unique();
|
|
|
|
$table->string('long');
|
2016-01-16 00:26:50 +00:00
|
|
|
$table->timestamps();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reverse the migrations.
|
|
|
|
*/
|
2022-11-25 20:29:04 +00:00
|
|
|
public function down(): void
|
2016-01-16 00:26:50 +00:00
|
|
|
{
|
2016-01-23 20:42:25 +00:00
|
|
|
Schema::dropIfExists('locations');
|
2016-01-16 00:26:50 +00:00
|
|
|
}
|
|
|
|
}
|