Migrations how they work?

I come from Django Framework and there migrations works great.
Basically i crated initial migration, it works.
I changed my db and i want create a new migration with migration_diff

bin/cake migrate (not my database is at “Initlial State”)
bin/cake migration_diff DatabaseUpdate
bin/cake migrate (now my database is at “Database Update State”)

bin/cake migration_diff DatabaseUpdate2

this is curious. Databaseupdate2 migration is equal to Database Update migration …
why this happen ?
because my expected behaviour must be an empty migration not the same, if i didn’t change my code in src/

Were there any warnings the second time you ran migration_diff? There should have been an error emitted if you had unapplied migrations.

Once you have applied all the migrations if you still have column changes that aren’t reflected in the migration state file another migration will be generated. Unlike Django the ORM in CakePHP is not where schema is canonically defined. Instead we use database reflection to define model schema from the database. This means that migration generation needs the additional dump file to know how to auto generate schema changes.