mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Add missing IP column to the migrations.
This commit is contained in:
21
web/classes/migrations/20140409103604_add_ip_to_sessions.php
Normal file
21
web/classes/migrations/20140409103604_add_ip_to_sessions.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
class AddIpToSessions extends AbstractMigration
|
||||
{
|
||||
/**
|
||||
* Add the new IP field to admin_session.
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$this->table('admin_session')
|
||||
->addColumn('IP', 'string', array('limit'=>255,'default' => null))
|
||||
->save();
|
||||
}
|
||||
public function down() {
|
||||
$sess = $this->table('admin_session');
|
||||
if ($sess->hasColumn('IP'))
|
||||
$sess->removeColumn('IP')->save();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user