diff --git a/lib/Migration/Version030000Date20190305114917.php b/lib/Migration/Version030000Date20190305114917.php index cbf5fe579..b061b7a37 100644 --- a/lib/Migration/Version030000Date20190305114917.php +++ b/lib/Migration/Version030000Date20190305114917.php @@ -22,12 +22,13 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt $schema = $schemaClosure(); $table = $schema->getTable('twofactor_totp_secrets'); - // TODO: use \OCP\DB\Types::BIGINT - $table->addColumn('last_counter', 'bigint', [ - 'notnull' => true, - 'default' => -1, - ]); - + if (!$table->hasColumn('last_counter')) { + // TODO: use \OCP\DB\Types::BIGINT + $table->addColumn('last_counter', 'bigint', [ + 'notnull' => true, + 'default' => -1, + ]); + } return $schema; } }