add migration for lengthening ip field

This commit is contained in:
Pig Fang 2020-03-10 14:59:50 +08:00
parent 31c56e9121
commit b66a48181f

View File

@ -0,0 +1,22 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class LengthenIpField extends Migration
{
public function up()
{
Schema::table('users', function (Blueprint $table) {
$table->string('ip', 45)->change();
});
}
public function down()
{
Schema::table('users', function (Blueprint $table) {
$table->string('ip', 39)->change();
});
}
}