yiisoft / yiisoft/db

Add restartSequence() method to the CommandInterface

Open
#1,167 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

severity:BC breaking type:enhancement
Dominant language
PHP
Stars
216
Forks
51
Avg merge
3d 10h
Merged PRs (30d)
2

Description

Proposed new feature or change

Add method to restart sequence.

Sql statement example for postgresql:
ALTER SEQUENCE {$sequence} RESTART;

The sequence does not always start from 1, so the existing method resetSequence() cannot be used.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at CommandInterface and trace the existing resetSequence() method through its database-specific implementations. Compare the PostgreSQL ALTER SEQUENCE ... RESTART behavior with the current reset behavior, then identify the relevant tests or implementation coverage; the work is done when the new method is available consistently and preserves sequences whose starting value is not 1.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, postgresql
Domain
databases
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.