Skip to content

Resolve TODO: Start $i by looking at all files, otherwise only one generation per hours causes correct order #32

@SOHELAHMED7

Description

@SOHELAHMED7

Unable to figure out properly what this TODO is trying to convey

File: src/lib/generators/MigrationsGenerator.php::generate()

image

Does it try to convey that do while loop should be replaced by for loop as:

            for ($i = 0; $i < PHP_INT_MAX; $i++) {
                $date = YII_ENV_TEST ? '200000_00' : '';
                $className = $migration->makeClassNameByTime($i, $migrationNamespace, $date);
                if (!file_exists(Yii::getAlias("$migrationPath/$className.php"))) {
                    break;
                }
            }

@cebe any thoughts?


Part of #10

and

Part of cebe#180

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions