こんにちは。しおあじ と申します。
redmine_checklists-3_1_21-light をインストールしようとしています。
プラグインのマイグレートがスキップされている様に見えるのですが、原因が判らず困っています。
どなたかヒントなどいただけますと助かります。。。
どうぞよろしくお願い致します。。
■マイグレート
C:\Bitnami\redmine-4.2.3-4\apps\redmine\htdocs>bundle exec rake redmine:plugins:migrate RAILS_ENV=production --trace
** Invoke redmine:plugins:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute redmine:plugins:migrate
== 3 CreateChecklistTemplateCategory: migrating ===============================
-- create_table(:checklist_template_categories, {:options=>"ENGINE=InnoDB", :id=>:integer})
-> 0.3549s
== 3 CreateChecklistTemplateCategory: migrated (0.3590s) ======================
== 4 CreateChecklistTemplates: migrating ======================================
-- create_table(:checklist_templates, {:options=>"ENGINE=InnoDB", :id=>:integer})
-> 0.2208s
== 4 CreateChecklistTemplates: migrated (0.2245s) =============================
== 5 ModifyChecklistSubjectLength: migrating ==================================
-- change_column(:checklists, :subject, :string, {:limit=>512})
rake aborted!
StandardError: An error has occurred, all later migrations canceled:
Mysql2::Error: Table 'bitnami_redmine.checklists' doesn't exist: SHOW FULL FIELDS FROM `checklists`
★下記の最初Step001で テーブル checklists が作成されず
Step005でエラーになった様に見えます。
■\redmine_checklists\db\migrate フォルダ内のファイル
----------------------------------------------------------------------------------------
001_create_checklists.rb ★スキップされてる?
002_add_time_stamps_to_checklists.rb ★スキップされてる?
003_create_checklist_template_category.rb
004_create_checklist_templates.rb
005_modify_checklist_subject_length.rb
006_add_fields_to_checklist_template.rb
007_add_is_section_to_checklists.rb
----------------------------------------------------------------------------------------
■001_create_checklists.rbの内容です。
----------------------------------------------------------------------------------------
class CreateChecklists < Rails.version < '5.1' ? ActiveRecord::Migration : ActiveRecord::Migration[4.2]
def self.up
if ActiveRecord::Base.connection.table_exists? :issue_checklists
rename_table :issue_checklists, :checklists
else
create_table :checklists do |t|
t.boolean :is_done, :default => false
t.string :subject
t.integer :position, :default => 1
t.references :issue, :null => false
end
end
end
def self.down
drop_table :checklists
end
end
----------------------------------------------------------------------------------------
・Rails version 5.2.6
・issue_checklistsというテーブルは、あったのですが、dropして削除しました。
・試しに、下記の様に▲の行を削除してみましたが、同じ結果でした。
-------------------------------------
def self.up
▲if ActiveRecord::Base.connection.table_exists? :issue_checklists
▲ rename_table :issue_checklists, :checklists
▲else
create_table :checklists do |t|
t.boolean :is_done, :default => false
t.string :subject
t.integer :position, :default => 1
t.references :issue, :null => false
▲ end
end
end
-------------------------------------
以上です。