Skip to content

Commit

Permalink
remove: Purge ip_checking of polls/voters table in db.
Browse files Browse the repository at this point in the history
(For search: migration migrate script.)
  • Loading branch information
gyakkun committed Feb 14, 2020
1 parent 957ac57 commit 4199867
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class DropIpCheckingInPollsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('polls', function (Blueprint $table) {
$table->dropColumn('ip_checking');
});
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('polls', function (Blueprint $table) {
$table->boolean('ip_checking')->default(0);
});
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class DropIpAddressInVotersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('voters', function (Blueprint $table) {
$table->dropColumn('ip_address');
});
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('voters', function (Blueprint $table) {
$table->string('ip_address')->default('dbRollback');
});
}
}

0 comments on commit 4199867

Please sign in to comment.