Skip to content
This repository has been archived by the owner on Jan 23, 2021. It is now read-only.

issue_templates table does not exists #285

Closed
mihainicu opened this issue Oct 2, 2019 · 8 comments
Closed

issue_templates table does not exists #285

mihainicu opened this issue Oct 2, 2019 · 8 comments
Labels
wontfix Not a bug and won’t take an action for bug fix.

Comments

@mihainicu
Copy link

This is a template to report bug related to redmine issue templates plugin.
You can fill in any format, free style in case report features or questions.

Summary

I installed the plugin and used

bundle exec rake redmine:plugins:migrate RAILS_ENV=production --trace

but I receive that table issue_templates is not present

Description

Environment

These informations are greatly helpful to support quickly.
You can get these informations from Redmine's information page.
(E.g. http://example.com/admin/info)

  • Redmine version
    4.0.4

  • Installed plugins
    redmine_lightbox2
    redmine_issue_dynamic_edit
    additionals
    redmine_checklists

  • Ruby version
    2.6.3p62

  • OS Platform
    CentOS 7

  • Database (MariaDB, MySQL, PostgreSQL) and its version
    Mariadb 10.4

  • Rails Env
    Rails 5.2.3

Visual Proof / Screenshot

When reporting an application error, post the error stack trace that
you should find in the log file (eg. log/production.log).

Screen shot would be also helpful.

Expected Results

Actual Results

Caused by:
Mysql2::Error: Table 'redmine2.issue_templates' doesn't exist
/home/redmine/gems/ruby-2.6.3/gems/mysql2-0.5.2/lib/mysql2/client.rb:131:in _query' /home/redmine/gems/ruby-2.6.3/gems/mysql2-0.5.2/lib/mysql2/client.rb:131:in block in query'
/home/redmine/gems/ruby-2.6.3/gems/mysql2-0.5.2/lib/mysql2/client.rb:130:in handle_interrupt' /home/redmine/gems/ruby-2.6.3/gems/mysql2-0.5.2/lib/mysql2/client.rb:130:in query'
/home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:187:in block (2 levels) in execute' /home/redmine/gems/ruby-2.6.3/gems/activesupport-5.2.3/lib/active_support/dependencies/interlock.rb:48:in block in permit_concurrent_loads'
/home/redmine/gems/ruby-2.6.3/gems/activesupport-5.2.3/lib/active_support/concurrency/share_lock.rb:187:in yield_shares' /home/redmine/gems/ruby-2.6.3/gems/activesupport-5.2.3/lib/active_support/dependencies/interlock.rb:47:in permit_concurrent_loads'
/home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:186:in block in execute' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract_adapter.rb:581:in block (2 levels) in log'
/home/redmine/rubies/ruby-2.6.3/lib/ruby/2.6.0/monitor.rb:230:in mon_synchronize' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract_adapter.rb:580:in block in log'
/home/redmine/gems/ruby-2.6.3/gems/activesupport-5.2.3/lib/active_support/notifications/instrumenter.rb:23:in instrument' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract_adapter.rb:571:in log'
/home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:185:in execute' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/connection_adapters/mysql/database_statements.rb:28:in execute'
/home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/schema_statements.rb:581:in add_column' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:871:in block in method_missing'
/home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:840:in block in say_with_time' /home/redmine/rubies/ruby-2.6.3/lib/ruby/2.6.0/benchmark.rb:293:in measure'
/home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:840:in say_with_time' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:860:in method_missing'
/home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration/compatibility.rb:108:in add_column' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:604:in method_missing'
/home/redmine/plugins/redmine_issue_templates/db/migrate/0003_add_issue_title_to_issue_templates.rb:3:in up' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:777:in up'
/home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:817:in exec_migration' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:798:in block (2 levels) in migrate'
/home/redmine/rubies/ruby-2.6.3/lib/ruby/2.6.0/benchmark.rb:293:in measure' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:797:in block in migrate'
/home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:416:in with_connection' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:796:in migrate'
/home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:977:in migrate' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:1292:in block in execute_migration_in_transaction'
/home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:1345:in ddl_transaction' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:1291:in execute_migration_in_transaction'
/home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:1263:in block in migrate_without_lock' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:1262:in each'
/home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:1262:in migrate_without_lock' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:1210:in block in migrate'
/home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:1363:in with_advisory_lock' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:1210:in migrate'
/home/redmine/lib/redmine/plugin.rb:510:in up' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:1011:in migrate'
/home/redmine/lib/redmine/plugin.rb:542:in migrate_plugin' /home/redmine/lib/redmine/plugin.rb:483:in migrate'
/home/redmine/lib/redmine/plugin.rb:497:in block in migrate' /home/redmine/lib/redmine/plugin.rb:496:in each'
/home/redmine/lib/redmine/plugin.rb:496:in migrate' /home/redmine/lib/tasks/redmine.rake:135:in block (3 levels) in <top (required)>'
/home/redmine/gems/ruby-2.6.3/gems/rake-12.3.3/lib/rake/task.rb:273:in block in execute' /home/redmine/gems/ruby-2.6.3/gems/rake-12.3.3/lib/rake/task.rb:273:in each'
/home/redmine/gems/ruby-2.6.3/gems/rake-12.3.3/lib/rake/task.rb:273:in execute' /home/redmine/gems/ruby-2.6.3/gems/rake-12.3.3/lib/rake/task.rb:214:in block in invoke_with_call_chain'
/home/redmine/rubies/ruby-2.6.3/lib/ruby/2.6.0/monitor.rb:230:in mon_synchronize' /home/redmine/gems/ruby-2.6.3/gems/rake-12.3.3/lib/rake/task.rb:194:in invoke_with_call_chain'
/home/redmine/gems/ruby-2.6.3/gems/rake-12.3.3/lib/rake/task.rb:183:in invoke' /home/redmine/gems/ruby-2.6.3/gems/rake-12.3.3/lib/rake/application.rb:160:in invoke_task'
/home/redmine/gems/ruby-2.6.3/gems/rake-12.3.3/lib/rake/application.rb:116:in block (2 levels) in top_level' /home/redmine/gems/ruby-2.6.3/gems/rake-12.3.3/lib/rake/application.rb:116:in each'
/home/redmine/gems/ruby-2.6.3/gems/rake-12.3.3/lib/rake/application.rb:116:in block in top_level' /home/redmine/gems/ruby-2.6.3/gems/rake-12.3.3/lib/rake/application.rb:125:in run_with_threads'
/home/redmine/gems/ruby-2.6.3/gems/rake-12.3.3/lib/rake/application.rb:110:in top_level' /home/redmine/gems/ruby-2.6.3/gems/rake-12.3.3/lib/rake/application.rb:83:in block in run'
/home/redmine/gems/ruby-2.6.3/gems/rake-12.3.3/lib/rake/application.rb:186:in standard_exception_handling' /home/redmine/gems/ruby-2.6.3/gems/rake-12.3.3/lib/rake/application.rb:80:in run'
/home/redmine/gems/ruby-2.6.3/gems/rake-12.3.3/exe/rake:27:in <top (required)>' /home/redmine/gems/ruby-2.6.3/bin/rake:23:in load'
/home/redmine/gems/ruby-2.6.3/bin/rake:23:in <main>' /home/redmine/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in eval'
/home/redmine/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in `

'

Workaround

Please let me know if you have any workaround.

@github-actions
Copy link

github-actions bot commented Oct 2, 2019

Thank you for contributing to Redmine Issue Templates plugin!' first issue

@akiko-pusu
Copy link
Owner

Hi, @mihainicu
Thanks for trying my plugin.

Is the above log is the result of bundle exec rake redmine:plugins:migrate RAILS_ENV=production --trace or not?

/home/redmine/plugins/redmine_issue_templates/db/migrate/0003_add_issue_title_to_issue_templates.rb:3

This message tells that first and second migration has already done, such as create tables named issue_templates.
And the migration task tries to alter the table.

Let me confirm, have you already tried to install my plugin before?
It seems some migration records related to Issue Template exist.

If you can access and select database for Redmine, try this command:

select * from schema_migrations where version like '%redmine_issue_templates%';

If there are any records shown like this and there is no table named 'issue_templates', your installation has been incomplete state.

1-redmine_issue_templates
2-redmine_issue_templates

So, you should better to uninstall task first, and retry the migration.

If you have not created any template records yet, and hope to uninstall and re-install this plugin, please see README.

Uninstall:
rake db:migrate_plugins NAME=redmine_issue_templates VERSION=0 RAILS_ENV=production
(After that, records of migration are removed from schema_migrations table)

Re-install
rake db:migrate_plugins NAME=redmine_issue_templates RAILS_ENV=production

Related:
#82 (comment)

@akiko-pusu
Copy link
Owner

@mihainicu How is the situation?

@mihainicu
Copy link
Author

mihainicu commented Oct 8, 2019

Hi,

Indeed, the schema_migrations table returns the following value:

+---------------------------+
| version |
+---------------------------+
| 1-redmine_issue_templates |
+---------------------------+

but the command to uninstall it fails with:

rake db:migrate_plugins NAME=redmine_issue_templates VERSION=0 RAILS_ENV=production --trace
** Invoke db:migrate_plugins (first_time)
** Invoke redmine:plugins:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute redmine:plugins:migrate
== 1 CreateIssueTemplates: reverting ==========================================
rake aborted!
StandardError: An error has occurred, all later migrations canceled:

Mysql2::Error: Table 'redmine2.issue_templates' doesn't exist: SHOW KEYS FROM issue_templates
/home/redmine/gems/ruby-2.6.3/gems/mysql2-0.5.2/lib/mysql2/client.rb:131:in _query' /home/redmine/gems/ruby-2.6.3/gems/mysql2-0.5.2/lib/mysql2/client.rb:131:in block in query'
/home/redmine/gems/ruby-2.6.3/gems/mysql2-0.5.2/lib/mysql2/client.rb:130:in handle_interrupt' /home/redmine/gems/ruby-2.6.3/gems/mysql2-0.5.2/lib/mysql2/client.rb:130:in query'
/home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:187:in block (2 levels) in execute' /home/redmine/gems/ruby-2.6.3/gems/activesupport-5.2.3/lib/active_support/dependencies/interlock.rb:48:in block in permit_concurrent_loads'
/home/redmine/gems/ruby-2.6.3/gems/activesupport-5.2.3/lib/active_support/concurrency/share_lock.rb:187:in yield_shares' /home/redmine/gems/ruby-2.6.3/gems/activesupport-5.2.3/lib/active_support/dependencies/interlock.rb:47:in permit_concurrent_loads'
/home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:186:in block in execute' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract_adapter.rb:581:in block (2 levels) in log'
/home/redmine/rubies/ruby-2.6.3/lib/ruby/2.6.0/monitor.rb:230:in mon_synchronize' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract_adapter.rb:580:in block in log'
/home/redmine/gems/ruby-2.6.3/gems/activesupport-5.2.3/lib/active_support/notifications/instrumenter.rb:23:in instrument' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract_adapter.rb:571:in log'
/home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:185:in execute' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/connection_adapters/mysql/database_statements.rb:28:in execute'
/home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:196:in execute_and_free' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/connection_adapters/mysql/schema_statements.rb:11:in indexes'
/home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/schema_statements.rb:824:in index_name_exists?' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration/compatibility.rb:198:in index_name_for_remove'
/home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration/compatibility.rb:183:in remove_index' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:604:in method_missing'
/home/redmine/plugins/redmine_issue_templates/db/migrate/0001_create_issue_templates.rb:20:in down' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:783:in down'
/home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:817:in exec_migration' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:798:in block (2 levels) in migrate'
/home/redmine/rubies/ruby-2.6.3/lib/ruby/2.6.0/benchmark.rb:293:in measure' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:797:in block in migrate'
/home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:416:in with_connection' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:796:in migrate'
/home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:977:in migrate' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:1292:in block in execute_migration_in_transaction'
/home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:1345:in ddl_transaction' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:1291:in execute_migration_in_transaction'
/home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:1263:in block in migrate_without_lock' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:1262:in each'
/home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:1262:in migrate_without_lock' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:1210:in block in migrate'
/home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:1363:in with_advisory_lock' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:1210:in migrate'
/home/redmine/lib/redmine/plugin.rb:520:in down' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:1015:in migrate'
/home/redmine/lib/redmine/plugin.rb:542:in migrate_plugin' /home/redmine/lib/redmine/plugin.rb:483:in migrate'
/home/redmine/lib/redmine/plugin.rb:494:in migrate' /home/redmine/lib/tasks/redmine.rake:135:in block (3 levels) in <top (required)>'
/home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/task.rb:280:in block in execute' /home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/task.rb:280:in each'
/home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/task.rb:280:in execute' /home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/task.rb:218:in block in invoke_with_call_chain'
/home/redmine/rubies/ruby-2.6.3/lib/ruby/2.6.0/monitor.rb:230:in mon_synchronize' /home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/task.rb:198:in invoke_with_call_chain'
/home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/task.rb:242:in block in invoke_prerequisites' /home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/task.rb:240:in each'
/home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/task.rb:240:in invoke_prerequisites' /home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/task.rb:217:in block in invoke_with_call_chain'
/home/redmine/rubies/ruby-2.6.3/lib/ruby/2.6.0/monitor.rb:230:in mon_synchronize' /home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/task.rb:198:in invoke_with_call_chain'
/home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/task.rb:187:in invoke' /home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/application.rb:160:in invoke_task'
/home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/application.rb:116:in block (2 levels) in top_level' /home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/application.rb:116:in each'
/home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/application.rb:116:in block in top_level' /home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/application.rb:125:in run_with_threads'
/home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/application.rb:110:in top_level' /home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/application.rb:83:in block in run'
/home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/application.rb:186:in standard_exception_handling' /home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/application.rb:80:in run'
/home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/exe/rake:27:in <top (required)>' /home/redmine/gems/ruby-2.6.3/bin/rake:23:in load'
/home/redmine/gems/ruby-2.6.3/bin/rake:23:in <main>' /home/redmine/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in eval'
/home/redmine/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in `

'

Caused by:
ActiveRecord::StatementInvalid: Mysql2::Error: Table 'redmine2.issue_templates' doesn't exist: SHOW KEYS FROM issue_templates
/home/redmine/gems/ruby-2.6.3/gems/mysql2-0.5.2/lib/mysql2/client.rb:131:in _query' /home/redmine/gems/ruby-2.6.3/gems/mysql2-0.5.2/lib/mysql2/client.rb:131:in block in query'
/home/redmine/gems/ruby-2.6.3/gems/mysql2-0.5.2/lib/mysql2/client.rb:130:in handle_interrupt' /home/redmine/gems/ruby-2.6.3/gems/mysql2-0.5.2/lib/mysql2/client.rb:130:in query'
/home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:187:in block (2 levels) in execute' /home/redmine/gems/ruby-2.6.3/gems/activesupport-5.2.3/lib/active_support/dependencies/interlock.rb:48:in block in permit_concurrent_loads'
/home/redmine/gems/ruby-2.6.3/gems/activesupport-5.2.3/lib/active_support/concurrency/share_lock.rb:187:in yield_shares' /home/redmine/gems/ruby-2.6.3/gems/activesupport-5.2.3/lib/active_support/dependencies/interlock.rb:47:in permit_concurrent_loads'
/home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:186:in block in execute' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract_adapter.rb:581:in block (2 levels) in log'
/home/redmine/rubies/ruby-2.6.3/lib/ruby/2.6.0/monitor.rb:230:in mon_synchronize' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract_adapter.rb:580:in block in log'
/home/redmine/gems/ruby-2.6.3/gems/activesupport-5.2.3/lib/active_support/notifications/instrumenter.rb:23:in instrument' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract_adapter.rb:571:in log'
/home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:185:in execute' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/connection_adapters/mysql/database_statements.rb:28:in execute'
/home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:196:in execute_and_free' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/connection_adapters/mysql/schema_statements.rb:11:in indexes'
/home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/schema_statements.rb:824:in index_name_exists?' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration/compatibility.rb:198:in index_name_for_remove'
/home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration/compatibility.rb:183:in remove_index' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:604:in method_missing'
/home/redmine/plugins/redmine_issue_templates/db/migrate/0001_create_issue_templates.rb:20:in down' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:783:in down'
/home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:817:in exec_migration' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:798:in block (2 levels) in migrate'
/home/redmine/rubies/ruby-2.6.3/lib/ruby/2.6.0/benchmark.rb:293:in measure' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:797:in block in migrate'
/home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:416:in with_connection' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:796:in migrate'
/home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:977:in migrate' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:1292:in block in execute_migration_in_transaction'
/home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:1345:in ddl_transaction' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:1291:in execute_migration_in_transaction'
/home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:1263:in block in migrate_without_lock' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:1262:in each'
/home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:1262:in migrate_without_lock' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:1210:in block in migrate'
/home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:1363:in with_advisory_lock' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:1210:in migrate'
/home/redmine/lib/redmine/plugin.rb:520:in down' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:1015:in migrate'
/home/redmine/lib/redmine/plugin.rb:542:in migrate_plugin' /home/redmine/lib/redmine/plugin.rb:483:in migrate'
/home/redmine/lib/redmine/plugin.rb:494:in migrate' /home/redmine/lib/tasks/redmine.rake:135:in block (3 levels) in <top (required)>'
/home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/task.rb:280:in block in execute' /home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/task.rb:280:in each'
/home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/task.rb:280:in execute' /home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/task.rb:218:in block in invoke_with_call_chain'
/home/redmine/rubies/ruby-2.6.3/lib/ruby/2.6.0/monitor.rb:230:in mon_synchronize' /home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/task.rb:198:in invoke_with_call_chain'
/home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/task.rb:242:in block in invoke_prerequisites' /home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/task.rb:240:in each'
/home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/task.rb:240:in invoke_prerequisites' /home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/task.rb:217:in block in invoke_with_call_chain'
/home/redmine/rubies/ruby-2.6.3/lib/ruby/2.6.0/monitor.rb:230:in mon_synchronize' /home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/task.rb:198:in invoke_with_call_chain'
/home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/task.rb:187:in invoke' /home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/application.rb:160:in invoke_task'
/home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/application.rb:116:in block (2 levels) in top_level' /home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/application.rb:116:in each'
/home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/application.rb:116:in block in top_level' /home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/application.rb:125:in run_with_threads'
/home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/application.rb:110:in top_level' /home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/application.rb:83:in block in run'
/home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/application.rb:186:in standard_exception_handling' /home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/application.rb:80:in run'
/home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/exe/rake:27:in <top (required)>' /home/redmine/gems/ruby-2.6.3/bin/rake:23:in load'
/home/redmine/gems/ruby-2.6.3/bin/rake:23:in <main>' /home/redmine/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in eval'
/home/redmine/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in `

'

Caused by:
Mysql2::Error: Table 'redmine2.issue_templates' doesn't exist
/home/redmine/gems/ruby-2.6.3/gems/mysql2-0.5.2/lib/mysql2/client.rb:131:in _query' /home/redmine/gems/ruby-2.6.3/gems/mysql2-0.5.2/lib/mysql2/client.rb:131:in block in query'
/home/redmine/gems/ruby-2.6.3/gems/mysql2-0.5.2/lib/mysql2/client.rb:130:in handle_interrupt' /home/redmine/gems/ruby-2.6.3/gems/mysql2-0.5.2/lib/mysql2/client.rb:130:in query'
/home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:187:in block (2 levels) in execute' /home/redmine/gems/ruby-2.6.3/gems/activesupport-5.2.3/lib/active_support/dependencies/interlock.rb:48:in block in permit_concurrent_loads'
/home/redmine/gems/ruby-2.6.3/gems/activesupport-5.2.3/lib/active_support/concurrency/share_lock.rb:187:in yield_shares' /home/redmine/gems/ruby-2.6.3/gems/activesupport-5.2.3/lib/active_support/dependencies/interlock.rb:47:in permit_concurrent_loads'
/home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:186:in block in execute' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract_adapter.rb:581:in block (2 levels) in log'
/home/redmine/rubies/ruby-2.6.3/lib/ruby/2.6.0/monitor.rb:230:in mon_synchronize' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract_adapter.rb:580:in block in log'
/home/redmine/gems/ruby-2.6.3/gems/activesupport-5.2.3/lib/active_support/notifications/instrumenter.rb:23:in instrument' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract_adapter.rb:571:in log'
/home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:185:in execute' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/connection_adapters/mysql/database_statements.rb:28:in execute'
/home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:196:in execute_and_free' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/connection_adapters/mysql/schema_statements.rb:11:in indexes'
/home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/schema_statements.rb:824:in index_name_exists?' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration/compatibility.rb:198:in index_name_for_remove'
/home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration/compatibility.rb:183:in remove_index' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:604:in method_missing'
/home/redmine/plugins/redmine_issue_templates/db/migrate/0001_create_issue_templates.rb:20:in down' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:783:in down'
/home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:817:in exec_migration' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:798:in block (2 levels) in migrate'
/home/redmine/rubies/ruby-2.6.3/lib/ruby/2.6.0/benchmark.rb:293:in measure' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:797:in block in migrate'
/home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:416:in with_connection' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:796:in migrate'
/home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:977:in migrate' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:1292:in block in execute_migration_in_transaction'
/home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:1345:in ddl_transaction' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:1291:in execute_migration_in_transaction'
/home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:1263:in block in migrate_without_lock' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:1262:in each'
/home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:1262:in migrate_without_lock' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:1210:in block in migrate'
/home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:1363:in with_advisory_lock' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:1210:in migrate'
/home/redmine/lib/redmine/plugin.rb:520:in down' /home/redmine/gems/ruby-2.6.3/gems/activerecord-5.2.3/lib/active_record/migration.rb:1015:in migrate'
/home/redmine/lib/redmine/plugin.rb:542:in migrate_plugin' /home/redmine/lib/redmine/plugin.rb:483:in migrate'
/home/redmine/lib/redmine/plugin.rb:494:in migrate' /home/redmine/lib/tasks/redmine.rake:135:in block (3 levels) in <top (required)>'
/home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/task.rb:280:in block in execute' /home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/task.rb:280:in each'
/home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/task.rb:280:in execute' /home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/task.rb:218:in block in invoke_with_call_chain'
/home/redmine/rubies/ruby-2.6.3/lib/ruby/2.6.0/monitor.rb:230:in mon_synchronize' /home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/task.rb:198:in invoke_with_call_chain'
/home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/task.rb:242:in block in invoke_prerequisites' /home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/task.rb:240:in each'
/home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/task.rb:240:in invoke_prerequisites' /home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/task.rb:217:in block in invoke_with_call_chain'
/home/redmine/rubies/ruby-2.6.3/lib/ruby/2.6.0/monitor.rb:230:in mon_synchronize' /home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/task.rb:198:in invoke_with_call_chain'
/home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/task.rb:187:in invoke' /home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/application.rb:160:in invoke_task'
/home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/application.rb:116:in block (2 levels) in top_level' /home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/application.rb:116:in each'
/home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/application.rb:116:in block in top_level' /home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/application.rb:125:in run_with_threads'
/home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/application.rb:110:in top_level' /home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/application.rb:83:in block in run'
/home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/application.rb:186:in standard_exception_handling' /home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/lib/rake/application.rb:80:in run'
/home/redmine/gems/ruby-2.6.3/gems/rake-13.0.0/exe/rake:27:in <top (required)>' /home/redmine/gems/ruby-2.6.3/bin/rake:23:in load'
/home/redmine/gems/ruby-2.6.3/bin/rake:23:in <main>' /home/redmine/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in eval'
/home/redmine/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in `

'
Tasks: TOP => db:migrate_plugins => redmine:plugins:migrate

I will create a new instance of redmine and see if the same issue is returned.

@akiko-pusu
Copy link
Owner

I will create a new instance of redmine and see if the same issue is returned.

Did you also re-create database?
Please confirm your database.yml and database name that you hope to use.

If you can't uninstall with rails redmine:plugins:migrate task, you can uninstall the plugin manually with deleting records from schema_migrations table.

delete from schema_migrations where version like '%redmine_issue_templates%';

Then, try to run plugin install task.

bundle exec rake redmine:plugins:migrate NAME=redmine_issue_templates RAILS_ENV=production --trace

@akiko-pusu akiko-pusu added the wontfix Not a bug and won’t take an action for bug fix. label Oct 12, 2019
@akiko-pusu
Copy link
Owner

@mihainicu How is your situation?

@mihainicu
Copy link
Author

mihainicu commented Oct 19, 2019 via email

@akiko-pusu
Copy link
Owner

@mihainicu Nice to hear that!
And thank you so much for your reporting and your detailed information.
I believe this kind of information is quite useful to users who saw the same situation.

Regards,

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
wontfix Not a bug and won’t take an action for bug fix.
Projects
None yet
Development

No branches or pull requests

2 participants