Skip to content

Commit

Permalink
Fix the order of upgrade tasks
Browse files Browse the repository at this point in the history
If we run the dedecated 5.0 upgrade tasks before installing the migrations it will skip installing them. Since it is not harmfil to run the migrations before hand and this was the case for the upgrader all the time this fix should be considered fine.
  • Loading branch information
tvdeyen committed Jun 4, 2020
1 parent a67c632 commit 9f18b95
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions lib/tasks/alchemy/upgrade.rake
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace :alchemy do
desc "Upgrades your app to AlchemyCMS v#{Alchemy::VERSION}."
task upgrade: [
"alchemy:upgrade:prepare",
"alchemy:upgrade:5.0:run",
] do
Alchemy::Upgrader.display_todos
end
Expand All @@ -19,9 +20,6 @@ namespace :alchemy do

desc "Alchemy Upgrader: Prepares the database."
task database: [
"alchemy:upgrade:5.0:install_gutentag_migrations",
"alchemy:upgrade:5.0:remove_layout_roots",
"alchemy:upgrade:5.0:remove_root_page",
"alchemy:install:migrations",
"db:migrate",
]
Expand All @@ -34,11 +32,18 @@ namespace :alchemy do
desc "Upgrade Alchemy to v5.0"
task "5.0" => [
"alchemy:upgrade:prepare",
"alchemy:upgrade:5.0:run",
] do
Alchemy::Upgrader.display_todos
end

namespace "5.0" do
task "run" => [
"alchemy:upgrade:5.0:install_gutentag_migrations",
"alchemy:upgrade:5.0:remove_layout_roots",
"alchemy:upgrade:5.0:remove_root_page",
]

desc "Install Gutentag migrations"
task install_gutentag_migrations: [:environment] do
Alchemy::Upgrader::FivePointZero.install_gutentag_migrations
Expand Down

0 comments on commit 9f18b95

Please sign in to comment.