mirror of
https://github.com/wallabag/wallabag.git
synced 2025-09-15 18:57:05 +00:00
fixup! Add a two-step setup of OTP
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
This commit is contained in:
parent
c5f18ca5bc
commit
e674458f22
2 changed files with 5 additions and 4 deletions
|
@ -12,13 +12,14 @@ use Wallabag\Doctrine\WallabagMigration;
|
||||||
*/
|
*/
|
||||||
final class Version20250413133131 extends WallabagMigration
|
final class Version20250413133131 extends WallabagMigration
|
||||||
{
|
{
|
||||||
|
|
||||||
public function up(Schema $schema): void
|
public function up(Schema $schema): void
|
||||||
{
|
{
|
||||||
$userTable = $schema->getTable($this->getTable('user'));
|
$userTable = $schema->getTable($this->getTable('user'));
|
||||||
|
|
||||||
$this->skipIf($userTable->hasColumn('googleauthenticator'), 'It seems that you already played this migration.');
|
$this->skipIf($userTable->hasColumn('google_authenticator'), 'It seems that you already played this migration.');
|
||||||
|
|
||||||
$userTable->addColumn('googleauthenticator', 'boolean', [
|
$userTable->addColumn('google_authenticator', 'boolean', [
|
||||||
'default' => false,
|
'default' => false,
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
]);
|
]);
|
||||||
|
@ -27,6 +28,6 @@ final class Version20250413133131 extends WallabagMigration
|
||||||
public function down(Schema $schema): void
|
public function down(Schema $schema): void
|
||||||
{
|
{
|
||||||
$userTable = $schema->getTable($this->getTable('user'));
|
$userTable = $schema->getTable($this->getTable('user'));
|
||||||
$userTable->dropColumn('googleauthenticator');
|
$userTable->dropColumn('google_authenticator');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -147,7 +147,7 @@ class User extends BaseUser implements EmailTwoFactorInterface, GoogleTwoFactorI
|
||||||
#[ORM\Column(name: 'googleAuthenticatorSecret', type: 'string', nullable: true)]
|
#[ORM\Column(name: 'googleAuthenticatorSecret', type: 'string', nullable: true)]
|
||||||
private $googleAuthenticatorSecret;
|
private $googleAuthenticatorSecret;
|
||||||
|
|
||||||
#[ORM\Column(name: 'googleAuthenticator', type: 'boolean')]
|
#[ORM\Column(name: 'google_authenticator', type: 'boolean')]
|
||||||
private $googleAuthenticator = false;
|
private $googleAuthenticator = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue