Skip to content
This repository was archived by the owner on Sep 10, 2021. It is now read-only.

Commit ce1270f

Browse files
author
Michael Grauer
committed
BUG: Refs #0298. Added update for itemmetric pgsql seq max id, for test data.
1 parent 474c13c commit ce1270f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

modules/batchmake/tests/models/base/ItemmetricModelTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ public function setUp()
1919
$this->enabledModules = array('batchmake');
2020
parent::setUp();
2121
$this->setupDatabase(array('default'), 'batchmake'); // module dataset
22+
$db = Zend_Registry::get('dbAdapter');
23+
$configDatabase = Zend_Registry::get('configDatabase' );
24+
if($configDatabase->database->adapter == 'PDO_PGSQL')
25+
{
26+
$db->query("SELECT setval('batchmake_itemmetric_itemmetric_id_seq', (SELECT MAX(itemmetric_id) FROM batchmake_itemmetric)+1);");
27+
}
2228
}
2329

2430
/** Test that ItemmetricModel::createTask($userDao) works */

0 commit comments

Comments
 (0)