Skip to content

Commit

Permalink
listmonk: ensure correct application of data migration
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcelCoding committed Feb 17, 2024
1 parent 5c50205 commit 4df7728
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion nixos/modules/services/mail/listmonk.nix
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,11 @@ in {
# Indeed, it will try to create all the folders and realize one of them already exist.
# Therefore, we have to create it ourselves.
''${pkgs.coreutils}/bin/mkdir -p "''${STATE_DIRECTORY}/listmonk/uploads"''
"${cfg.package}/bin/listmonk --config ${cfgFile} --idempotent --install --upgrade --yes"
# setup database if not already done
"${cfg.package}/bin/listmonk --config ${cfgFile} --idempotent --install --yes"
# apply db migrations (setup and migrations can not be done in one step
# with "--install --upgrade" listmonk ignores the upgrade)
"${cfg.package}/bin/listmonk --config ${cfgFile} --upgrade --yes"
"${updateDatabaseConfigScript}/bin/update-database-config.sh"
];
ExecStart = "${cfg.package}/bin/listmonk --config ${cfgFile}";
Expand Down

0 comments on commit 4df7728

Please sign in to comment.