From f9ba6302c1fa430f3a4c5e94ce6218900e9437a7 Mon Sep 17 00:00:00 2001 From: Deltik Date: Fri, 29 Mar 2019 18:20:23 -0500 Subject: [PATCH] Accounted for PHP 7 behavior change in db_verify::getPrevious() See: https://github.com/e107inc/e107/issues/3768 --- lib/ci/setup.sh | 1 + tests/unit/db_verifyTest.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/ci/setup.sh b/lib/ci/setup.sh index d952e9bc6..ce559b960 100755 --- a/lib/ci/setup.sh +++ b/lib/ci/setup.sh @@ -14,6 +14,7 @@ php composer-setup.php php -r "unlink('composer-setup.php');" php composer.phar install +php composer.phar update git submodule update --init --recursive --remote diff --git a/tests/unit/db_verifyTest.php b/tests/unit/db_verifyTest.php index 54f31ff50..cc7d2ad02 100644 --- a/tests/unit/db_verifyTest.php +++ b/tests/unit/db_verifyTest.php @@ -309,11 +309,11 @@ $actual = $this->dbv->getFixQuery('insert', 'table', 'table_auth', $sqlFileData); - $expected = "ALTER TABLE `e107_table` ADD `table_auth` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0'"; + $expected = "ALTER TABLE `e107_table` ADD `table_auth` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0' AFTER table_ip"; $this->assertEquals($expected,$actual); $actual = $this->dbv->getFixQuery('insert', 'table', 'table_json', $sqlFileData); - $expected = "ALTER TABLE `e107_table` ADD `table_json` JSON NOT NULL"; + $expected = "ALTER TABLE `e107_table` ADD `table_json` JSON NOT NULL AFTER table_category"; $this->assertEquals($expected,$actual); $actual = $this->dbv->getFixQuery('index', 'table', 'table_email', $sqlFileData);