mirror of
https://github.com/flarum/core.git
synced 2025-08-06 16:36:47 +02:00
Merge pull request #615 from oldskool/ip-logging
Minor changes: - Rename/restyle migration, fix namespace - Make IP address optional on PostReply command
This commit is contained in:
31
migrations/2015_10_24_194000_add_ip_address_to_posts.php
Normal file
31
migrations/2015_10_24_194000_add_ip_address_to_posts.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of Flarum.
|
||||
*
|
||||
* (c) Toby Zerner <toby.zerner@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\Core\Migration;
|
||||
|
||||
use Flarum\Database\AbstractMigration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class AddIpAddressToPosts extends AbstractMigration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
$this->schema->table('posts', function (Blueprint $table) {
|
||||
$table->string('ip_address', 45)->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->schema->table('posts', function (Blueprint $table) {
|
||||
$table->dropColumn(['ip_address']);
|
||||
});
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user