1
0
Fork 0
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:
Kevin Decherf 2025-07-19 03:15:31 +02:00
parent c5f18ca5bc
commit e674458f22
2 changed files with 5 additions and 4 deletions

View file

@ -12,13 +12,14 @@ use Wallabag\Doctrine\WallabagMigration;
*/
final class Version20250413133131 extends WallabagMigration
{
public function up(Schema $schema): void
{
$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,
'notnull' => true,
]);
@ -27,6 +28,6 @@ final class Version20250413133131 extends WallabagMigration
public function down(Schema $schema): void
{
$userTable = $schema->getTable($this->getTable('user'));
$userTable->dropColumn('googleauthenticator');
$userTable->dropColumn('google_authenticator');
}
}

View file

@ -147,7 +147,7 @@ class User extends BaseUser implements EmailTwoFactorInterface, GoogleTwoFactorI
#[ORM\Column(name: 'googleAuthenticatorSecret', type: 'string', nullable: true)]
private $googleAuthenticatorSecret;
#[ORM\Column(name: 'googleAuthenticator', type: 'boolean')]
#[ORM\Column(name: 'google_authenticator', type: 'boolean')]
private $googleAuthenticator = false;
/**