Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion framework/db/QueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -1054,12 +1054,13 @@ public function resetSequence($table, $value = null)
* @param string $table the name of the table whose primary key sequence is reset
* @param array|string|null $value the value for the primary key of the next new row inserted. If this is not set,
* the next new row's primary key will have the maximum existing value +1.
* @return int number of rows affected by the execution.
* @throws NotSupportedException if this is not supported by the underlying DBMS
* @since 2.0.16
*/
public function executeResetSequence($table, $value = null)
{
$this->db->createCommand()->resetSequence($table, $value)->execute();
return $this->db->createCommand()->resetSequence($table, $value)->execute();
}

/**
Expand Down