Skip to content

bin/cake bake migration_snapshot generates deprecated code #1045

@LordSimal

Description

@LordSimal

Version: 5.0.2

Just executed bin/cake bake migration_snapshot Something --generate-only as I regularely reset my migrations and noticed, that it still generates deprecated code

in particular it generates foreign key's like so:

        $this->table('repository_branches')
            ->addForeignKey(
                $this->foreignKey('repository_id')
                    ->setReferencedTable('repositories')
                    ->setReferencedColumns('id')
                    ->setOnDelete('RESTRICT')
                    ->setOnUpdate('RESTRICT')
                    ->setName('repository_branches_ibfk_1')
            )
            ->update();

the deprecated methods are setOnDelete and setOnUpdate

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions