PteroTheme/database/migrations/2015_12_10_223449_allow_nul...

30 lines
599 B
PHP
Raw Normal View History

2015-12-10 23:30:47 +00:00
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AllowNullRegex extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('service_variables', function (Blueprint $table) {
$table->string('regex')->nullable()->change();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
DB::statement('ALTER TABLE `service_variables` MODIFY `regex` VARCHAR(255) NOT NULL');
}
}