1
0
mirror of https://github.com/flarum/core.git synced 2025-08-05 16:07:34 +02:00

WIP IP Logging

This commit is contained in:
Jan Dorsman
2015-10-24 19:14:15 +02:00
parent 71bb3eadcd
commit 1dcbd6e22f
5 changed files with 47 additions and 4 deletions

View File

@@ -0,0 +1,30 @@
<?php
namespace Flarum\Migrations\Core;
use Illuminate\Database\Schema\Blueprint;
use Flarum\Database\AbstractMigration;
class AddIpToPosts extends AbstractMigration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
$this->schema->table('posts', function (Blueprint $table) {
$table->string('ip_address', 45)->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
$this->schema->table('posts', function (Blueprint $table) {
$table->dropColumn(['ip_address']);
});
}
}