From 2857b05ce7c7ff1dd15e5ccc137345d4464db0ea Mon Sep 17 00:00:00 2001 From: Christian Wolf Date: Tue, 23 Apr 2019 13:49:55 +0200 Subject: [PATCH] Given non-null default value to the database --- .travis.yml | 2 +- lib/Migration/Version2Date20180926055748.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 22112802..f337e044 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,7 +20,7 @@ env: - DB=sqlite addons: - mariadb: '10.1' + mariadb: '10.3' branches: only: diff --git a/lib/Migration/Version2Date20180926055748.php b/lib/Migration/Version2Date20180926055748.php index 193e2b08..fe90e6c2 100644 --- a/lib/Migration/Version2Date20180926055748.php +++ b/lib/Migration/Version2Date20180926055748.php @@ -56,6 +56,9 @@ private function makeExpiresNotNull(ISchemaWrapper $schema) { $codesTable = $schema->getTable('twofactor_admin_codes'); $expiresCol = $codesTable->getColumn('expires'); $expiresCol->setNotnull(true); + $expiresCol->setDefault(0); + $idCol = $codesTable->getColumn('id'); + $idCol->setAutoincrement(true); } }