mojolicious / minion

:octopus: Perl high performance job queue

Home Page:https://metacpan.org/release/Minion

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

when start minion worker, report error "minion_state" already exists

asthman666 opened this issue · comments

  • Minion version: 8.08
  • Perl version: 5.18.2
  • Operating system: macOS 10.13.1

Steps to reproduce the behavior

  1. I upgrade the Mojo, Minion, Mojo::Pg to the newest and install Mojolicious::Plugin::Minion
  2. I drop the table minion_jobs, minion_workers, minion_migrations
  3. 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.

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.

Thank you very much. @Grinnz
I use a wrong PostgreSQL account for upgrade, and then failed. So I decide to drop table and not do it done. I have resolved the issue.