/** * Creates / initializes a new sequence. * * @param int $initialValue * @return int The actually used value to initialize the table. * * @throws \Exception in case a sequence having this name already exists. */ public function create($initialValue = 0) { $initialValue = (int) $initialValue; $this->db->insert($this->table, array('name' => $this->name, 'value' => $initialValue)); return $initialValue; }