Skip to content

Commit

Permalink
reset sblink sequence when truncating
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxandreOgeret committed Jun 12, 2019
1 parent cec39c8 commit 1a6df00
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Repository/SBLinkRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ private function truncate()
$connection->beginTransaction();
try {
$connection->query('truncate table '.$cmd->getTableName());
$connection->query('ALTER SEQUENCE sblink_id_seq RESTART with 1;');
$connection->commit();
} catch (\Exception $e) {
$connection->rollback();
Expand Down

0 comments on commit 1a6df00

Please sign in to comment.