Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 of 3 tasks
salines opened this issue Jul 2, 2020 · 0 comments
Open
1 of 3 tasks

Comments

@salines
Copy link

salines commented Jul 2, 2020

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()
    {
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant