3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

メモ: Redmine2.5.2にbacklog v1.0.6のdb:migrate失敗

Last updated at Posted at 2014-07-19

AlminiumからRedmineに移行しようとしたが、
存在しないテーブルは以下

  • banner
  • chart_done_ratios
  • chart_issue_statuses
  • chart_time_entries
  • code_review_project_settings

ここまではdb/data.ymlから削除すれば良いのですが、

  • issues.position

が存在しない。
backlogsプラグインを入れていないのが原因。

試した手順

  • ubuntu14.10
redmineインストール
apt-get install -y redmine-sqlite
cd /usr/share/redmine/
ruby script/rails server webrick -e production
Gemfile.local
gem 'yaml_db'
gem 'git-issue'
bundle install
export RAILS_ENV=production
bundle exec rake db:data:dump
bundle exec rake db:data:load
RAILS_ENV=production rake db:data:load -R /var/lib/gems/2.1.0/gems -r yaml_db

backlogsプラグインのインストール

gem install holidays
cd ./lib/plugins
git clone git://github.com/backlogs/redmine_backlogs.git
git tag | tail
git checkout v1.0.6
cd -
RAILS_ENV=production rake redmine:load_default_data
rake generate_secret_token
rake redmine:plugins:migrate
# rake db:migrate
rake aborted!
uninitialized constant Backlogs::IssueQueryPatch::RbRelease

Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)

ubuntuのdb設定管理

/etc/dbconfig-common/redmine/instances/default.conf
dbc_dbname='redmine_default'
dbc_basepath='/var/lib/dbconfig-common/sqlite3/redmine/instances/default'

この設定で以下を参照するようになる。

  • /var/lib/dbconfig-common/sqlite3/redmine/instances/default/redmine_default
rm /var/lib/dbconfig-common/sqlite3/redmine/instances/default/redmine_default
rake db:create
db:migrate
3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?