Files
shortlink/config/Migrations/20190528003853_Version602.php
2024-03-17 11:39:27 +07:00

23 lines
581 B
PHP

<?php
use Migrations\AbstractMigration;
class Version602 extends AbstractMigration
{
public $autoId = false;
public function up()
{
$this->execute("SET SESSION sql_mode = ''");
$table_prefix = $this->getAdapter()->getOption('table_prefix');
$this->table('remember_tokens')
->removeIndexByName('idx_selector')
->removeIndexByName('idx_userid')
->addIndex('selector', ['name' => 'idx_selector', 'unique' => true])
->addIndex('user_id', ['name' => 'idx_userid'])
->update();
}
}