mirror of
https://github.com/elyby/accounts.git
synced 2024-11-30 02:32:26 +05:30
Удаляем уникальный индекс для поля client_token в таблице minecraft_access_keys
This commit is contained in:
parent
945f02e4ab
commit
20b0076672
@ -69,8 +69,8 @@ class AuthenticationForm extends Form {
|
||||
protected function createMinecraftAccessToken(Account $account) : MinecraftAccessKey {
|
||||
/** @var MinecraftAccessKey|null $accessTokenModel */
|
||||
$accessTokenModel = MinecraftAccessKey::findOne([
|
||||
'client_token' => $this->clientToken,
|
||||
'account_id' => $account->id,
|
||||
'client_token' => $this->clientToken,
|
||||
]);
|
||||
|
||||
if ($accessTokenModel === null) {
|
||||
|
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
use console\db\Migration;
|
||||
|
||||
class m161024_234121_remove_client_token_index extends Migration {
|
||||
|
||||
public function safeUp() {
|
||||
$this->dropIndex('client_token', '{{%minecraft_access_keys}}');
|
||||
}
|
||||
|
||||
public function safeDown() {
|
||||
$this->createIndex('client_token', '{{%minecraft_access_keys}}', 'client_token', true);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user