Skip to content

Commit 96ff3a0

Browse files
committed
fix: index key for identifier
1 parent 2464aff commit 96ff3a0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Database/Migrations/2020-12-28-223112_create_auth_tables.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function up(): void
6464
'success' => ['type' => 'tinyint', 'constraint' => 1],
6565
]);
6666
$this->forge->addPrimaryKey('id');
67-
$this->forge->addKey('identifier');
67+
$this->forge->addKey(['id_type', 'identifier']);
6868
$this->forge->addKey('user_id');
6969
// NOTE: Do NOT delete the user_id or identifier when the user is deleted for security audits
7070
$this->forge->createTable('auth_logins', true);
@@ -84,7 +84,7 @@ public function up(): void
8484
'success' => ['type' => 'tinyint', 'constraint' => 1],
8585
]);
8686
$this->forge->addPrimaryKey('id');
87-
$this->forge->addKey('identifier');
87+
$this->forge->addKey(['id_type', 'identifier']);
8888
$this->forge->addKey('user_id');
8989
// NOTE: Do NOT delete the user_id or identifier when the user is deleted for security audits
9090
$this->forge->createTable('auth_token_logins', true);

0 commit comments

Comments
 (0)