'Remember me' on login. Issue #81.
This commit is contained in:
parent
4ce3c94798
commit
07359d82f6
8 changed files with 158 additions and 147 deletions
|
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
class AddedRememberMeLogin extends AbstractMigration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
$table = $this->table('user');
|
||||
|
||||
if (!$table->hasColumn('remember_key')) {
|
||||
$table->addColumn('remember_key', 'string', ['limit' => 32, 'null' => true])->save();
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$table = $this->table('user');
|
||||
|
||||
if ($table->hasColumn('remember_key')) {
|
||||
$table->removeColumn('remember_key')->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue