Skip to content

Commit

Permalink
Comment ChangesCountNameGenerator
Browse files Browse the repository at this point in the history
  • Loading branch information
roxblnfk committed Dec 23, 2024
1 parent 9c53f76 commit b0bab72
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/ChangesCountNameGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,19 @@
use Cycle\Schema\Generator\Migrations\Changes\ChangeType;
use Cycle\Schema\Generator\Migrations\Changes\Collector;

/**
* Generates migration name based on changes count.
*
* Like:
* ct1_dt1_t2_c3_i3_fk3
* There are:
* - 1 create table
* - 1 drop table
* - 2 table changes
* - 3 column changes
* - 3 index changes
* - 3 foreign key changes
*/
final class ChangesCountNameGenerator implements NameGeneratorInterface
{
public function generate(Atomizer $atomizer): string
Expand Down

0 comments on commit b0bab72

Please sign in to comment.