when start minion worker, report error "minion_state" already exists
asthman666 opened this issue · comments
asthman commented
- Minion version: 8.08
- Perl version: 5.18.2
- Operating system: macOS 10.13.1
Steps to reproduce the behavior
- I upgrade the Mojo, Minion, Mojo::Pg to the newest and install Mojolicious::Plugin::Minion
- I drop the table minion_jobs, minion_workers, minion_migrations
- myapp.pl minion worker
Expected behavior
start the work correctly
Actual behavior
DBD::Pg::st execute failed: ERROR: type "minion_state" already exists at /Library/Perl/5.18/Mojo/Pg/Migrations.pm line 66.
Dan Book commented
If you drop minion_migrations then you need to remove everything in the schema that it's tracking. This includes the type 'minion_state', the functions 'minion_jobs_notify_workers' and 'minion_lock', and the table 'minion_locks'. Note that normally it's expected that you do not need to remove this table, as the purpose of migrations is to upgrade the schema as needed.