MyHomeCollection/database/migrations/2020_07_24_102725_update_homes_with_public_uuid.php
2020-07-24 13:11:21 +02:00

33 lines
691 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class UpdateHomesWithPublicUuid extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('homes', static function (Blueprint $table) {
$table->string('slug')->nullable()->comment('Uuid for public link');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('homes', static function (Blueprint $table) {
$table->dropColumn('slug');
});
}
}