feat: add reg ip to user col, rename original ip
This commit is contained in:
parent
c562d6fc48
commit
d3f471a546
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->renameColumn('originalIP', 'currentIp');
|
||||
$table->ipAddress('registrationIp')->after('originalIP');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->renameColumn('currentIp', 'originalIP');
|
||||
$table->removeColumn('ipAddress');
|
||||
});
|
||||
}
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user