hasTable('twofactor_backupcodes')) { $table = $schema->createTable('twofactor_backupcodes'); $table->addColumn('id', Types::INTEGER, [ 'autoincrement' => true, 'notnull' => true, 'length' => 20, ]); $table->addColumn('user_id', Types::STRING, [ 'notnull' => true, 'length' => 64, ]); $table->addColumn('code', Types::STRING, [ 'notnull' => true, 'length' => 64, ]); $table->addColumn('used', Types::INTEGER, [ 'notnull' => true, 'length' => 1, 'default' => 0, ]); $table->setPrimaryKey(['id']); $table->addIndex(['user_id'], 'twofactor_backupcodes_uid'); } return $schema; } }