Skip to content

PHP Artisan migrate doesn't seem to handle package migrations #16517

@ghost

Description

  • Laravel Version: 5.3.*
  • PHP Version: >5.6.4
  • Database Driver & Version: MySQL 5.7.16

Description:

Hey. I've been looking around the existing issue tickets, but I'm failing to find a solution to my problem. I'm probably doing something wrong, but here is my problem:

I just installed the venturecraft/revisionable package to my new Laravel installation, and I noticed that it comes with its own migration. To get it up and running, I ran the migration. Later, I thought to myself "Self, how will fresh installations of my project work if php artisan migrate doesn't run package migrations?" So now I ask this of you. I've thought about copying the migration to my main migrations folder, but this feels hacky and doesn't work for new migrations of new versions of my packages on composer update.

Also, if I ever run php artisan migrate:reset, it complains about the table from the package migration saying "Undefined index: 2013_04_09_062329_create_revisions_table".

Sorry if this has already been resolved. If it has, I haven't found it.

Steps To Reproduce:

composer require venturecraft/revisionable
php artisan migrate --path=vendor/venturecraft/revisionable/src/migrations
php artisan migrate:reset

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