Skip to content

Document a procedure to uninstall the bundle? #34

@damienalexandre

Description

@damienalexandre

Hi,

I'm removing this bundle from an application and it left some not common footprint.

As you ship a Doctrine Migration to create the table and inject it automatically:

$doctrineConfig = $container->getExtensionConfig('doctrine_migrations');
$container->prependExtensionConfig('doctrine_migrations', [
'migrations_paths' => array_merge(array_pop($doctrineConfig)['migrations_paths'] ?? [], [
'whatwedo\SearchBundle\Migrations' => '@whatwedoSearchBundle/Migrations',
]),
]);

This is automatically added:

image

The thing is when removing this bundle from an existing application, this migration stays in the migration_versions table and this message is then displayed by Doctrine:

[WARNING] You have 1 previously executed migrations in the database that are not registered migrations.

There is no way for an application developer to clean this excepts manually:

DELETE FROM doctrine_migration_versions WHERE version = 'whatwedo\\SearchBundle\\Migrations\\Version20220602150539';

Maybe that should be documented, or maybe you had this issue before and there is a better way?

Cheers

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions