laravel-doctrine / extensions

Extensions integration for Doctrine2 and Laravel
http://laraveldoctrine.org/
MIT License
47 stars 25 forks source link

Pivot tables disappear when you turn on extensions?! #30

Open Sztukmistrz opened 7 years ago

Sztukmistrz commented 7 years ago

ORM - is working properly, ALC - is working properly, migrations - are working properly, but when I turned on ALL the extensions in the "config / doctrine.php"

'extensions'                 => [
        LaravelDoctrine\ORM\Extensions\TablePrefix\TablePrefixExtension::class,
        .......
        LaravelDoctrine\Extensions\Uploadable\UploadableExtension::class
    ],
...
   'gedmo'                      => [
        'all_mappings' => true
    ],

and I ran the migration:

   1. php artisan doctrine:migrations:diff 
   2. php artisan doctrine:migrations:migrate

Pivot tables ( 'permission_user' etc ) disappear from the database (MySQL)!?

Step by step, I turn on the extensions one by one, I repeated migrations. The tables disappear when you turn on of this two extensions: LoggableExtension BlameableExtension

OK. this extensions needs USER but... active (login) or fake user will not help in console/terminal The problem probably exists in the class migration? For now, the only way to circumvent the problem is to remove (comment //) extensions during migration and then turn them on again.

patrickbrouwers commented 6 years ago

Might be fixed by #37