Skip to content

Unable to bake migrations migration_snapshot in the plugin using another connection #463

@salines

Description

@salines

This is a (multiple allowed):

  • bug

  • enhancement

  • feature-discussion (RFC)

  • CakePHP Version: 4.0.9.

  • Migrations plugin version: ^3.0.

  • Bake plugin version (if relevant): ^2.0.3.

  • Database server (MySQL, SQLite, Postgres): MariaDB 10.4

  • PHP Version: 7.3

  • Platform / OS: Debian (VagrantBox debian/contrib-stretch64)

I try to bake migrations migration_snapshot in the plugin using another connection

  • Have two db on same server and setup in app.php (default, forum)

  • I can bake migrations snapshot or diff for both connection in main migrations folder, example
    bin/cake bake migration_snapshot Forum --connection forum

  • But if I try to bake migrations snapshot or diff in plugin (backed forum plugin) with 'forum' connection, then bake create migrations file with empty up and down methods

bin/cake bake migration_snapshot Forum --plugin Forum --connection forum

<?php
declare(strict_types=1);

use Migrations\AbstractMigration;

class Forum extends AbstractMigration
{
    /**
     * Up Method.
     * ...
     */
    public function up()
    {
    }

    /**
     * Down Method.
     * ...
    */
    public function down()
    {
    }
}

Metadata

Metadata

Assignees

No one assigned

    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