Skip to content
Kosuke Tanabe edited this page Jul 26, 2025 · 28 revisions

1.5系へのアップデート

Next-L Enju Leaf 1.5では、アップロードしたファイルの保存にActiveStorageを使用しており、このマイグレーション作業が必要になります。

警告: 必ずアプリケーションとデータベースのバックアップを取得してください!

注意: Next-L Enju Leaf 1.5へのアップデートの前に、1.4.10以上にアップデートしておいてください

Enjuを停止します。

cd enju_leaf
docker compose down

新しいEnjuを取得します。

git fetch
git checkout 1.5
git pull

docker-compose.override.ymlを作成します。

cp docker-compose.override.example.yml docker-compose.override.yml

コンテナをビルドします。

docker compose build

データベースのマイグレーションを実行します。

docker compose run --rm web bin/rake enju_leaf:backfill_migration_versions
docker compose run --rm web bin/rake db:create
docker compose run --rm web bin/rake db:prepare

アップロードされたファイルのマイグレーションを実行します。

docker compose run --rm web bin/rake enju_leaf:migrate_attachments

識別子のレコードのマイグレーションを実行します。

docker compose run --rm web bin/rake enju_leaf:migrate_identifiers

キャッシュをクリアします。

docker compose run --rm web bin/rails r "Rails.cache.clear"

アプリケーションを再起動します。

docker compose up -d

http://localhost:8080 を開き、アクセスできることを確認します。

Clone this wiki locally