2019-02-20 20:47:14 -08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
2021-06-10 13:15:52 -07:00
|
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
2019-02-20 20:47:14 -08:00
|
|
|
|
|
|
|
class MakeSerialNullable extends Migration
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Run the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function up()
|
|
|
|
{
|
2019-02-20 21:04:03 -08:00
|
|
|
$platform = Schema::getConnection()->getDoctrineSchemaManager()->getDatabasePlatform();
|
|
|
|
$platform->registerDoctrineTypeMapping('enum', 'string');
|
|
|
|
|
2019-02-20 20:47:14 -08:00
|
|
|
Schema::table('assets', function (Blueprint $table) {
|
|
|
|
$table->string('serial')->nullable()->default(null)->change();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reverse the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function down()
|
|
|
|
{
|
|
|
|
//
|
|
|
|
}
|
|
|
|
}
|