anthropics / anthropics/claude-code
[BUG] yii1 bug with migration names
- Dominant language
- Python
- Stars
- 145k
- Forks
- 23.1k
- PR merge metrics
- PR metrics pending
Description
### Preflight Checklist
- [x] I have searched [existing issues](https://github.com/anthropics/claude-code/issues?q=is%3Aissue%20state%3Aopen%20label%3Abug) and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
### What's Wrong?
Do not allow the agent to generate migrations (file).
Either create the file yourself via protected/yiic migrate create or require the agent to use this command.
The agent uses the same pattern in the name when generating migrations
m260828_120000
Yii1 checks only 260828_120000 without the suffix. Therefore, 2 migrations created on the same day, even with different names - will not be applied!!
That is, if there is
m260901_120000_add_table.php
m260901_120000_add_column.php
Then only one of them will be executed, because Yii checks only 260901_120000
### What Should Happen?
Claude have to generate unique migration hash names instead of the same second parts: m260901_**120000**_
### Error Messages/Logs
```shell
```
### Steps to Reproduce
Say Claude to generate 2 migrations and check migration names.
### Claude Model
None
### Is this a regression?
Yes, this worked in a previous version
### Last Working Version
_No response_
### Claude Code Version
2.1.260
### Platform
Anthropic API
### Operating System
macOS
### Terminal/Shell
Terminal.app (macOS)
### Additional Information
_No response_
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the report: ask Claude to generate two Yii1 migrations, then compare their names with migrations created by protected/yiic migrate create. Inspect the migration-generation entry point and Yii1's timestamp parsing; done means two same-second migrations receive distinct names and both are applied.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100