diff options
author | rinpatch <rinpatch@sdf.org> | 2020-08-17 08:44:26 +0000 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2020-08-17 08:44:26 +0000 |
commit | 1f2aad6fda22a3af8b475b5e4a01eae95a3438da (patch) | |
tree | 800edf6e63d61bfbc0ae5e281123f09a0b6f807e | |
parent | ec242b470654e5e66e3d3a36e8d7563e15b08016 (diff) | |
parent | b2d3b26511476bc2786520130a37847f1d560333 (diff) | |
download | pleroma-1f2aad6fda22a3af8b475b5e4a01eae95a3438da.tar.gz |
Merge branch 'fix/start-ssl-if-ssl-required' into 'develop'
Start :ssl if not started when running migration or rollback
Closes #2056
See merge request pleroma/pleroma!2894
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | lib/mix/tasks/pleroma/ecto/migrate.ex | 4 | ||||
-rw-r--r-- | lib/mix/tasks/pleroma/ecto/rollback.ex | 4 |
3 files changed, 9 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index a8e80eb3c..83697beaf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -105,6 +105,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Fix edge case where MediaProxy truncates media, usually caused when Caddy is serving content for the other Federated instance. - Emoji Packs could not be listed when instance was set to `public: false` - Fix whole_word always returning false on filter get requests +- Migrations not working on OTP releases if the database was connected over ssl ## [Unreleased (patch)] diff --git a/lib/mix/tasks/pleroma/ecto/migrate.ex b/lib/mix/tasks/pleroma/ecto/migrate.ex index bc8ed29fb..e903bd171 100644 --- a/lib/mix/tasks/pleroma/ecto/migrate.ex +++ b/lib/mix/tasks/pleroma/ecto/migrate.ex @@ -41,6 +41,10 @@ defmodule Mix.Tasks.Pleroma.Ecto.Migrate do load_pleroma() {opts, _} = OptionParser.parse!(args, strict: @switches, aliases: @aliases) + if Application.get_env(:pleroma, Pleroma.Repo)[:ssl] do + Application.ensure_all_started(:ssl) + end + opts = if opts[:to] || opts[:step] || opts[:all], do: opts, diff --git a/lib/mix/tasks/pleroma/ecto/rollback.ex b/lib/mix/tasks/pleroma/ecto/rollback.ex index f43bd0b98..3dba952cb 100644 --- a/lib/mix/tasks/pleroma/ecto/rollback.ex +++ b/lib/mix/tasks/pleroma/ecto/rollback.ex @@ -40,6 +40,10 @@ defmodule Mix.Tasks.Pleroma.Ecto.Rollback do load_pleroma() {opts, _} = OptionParser.parse!(args, strict: @switches, aliases: @aliases) + if Application.get_env(:pleroma, Pleroma.Repo)[:ssl] do + Application.ensure_all_started(:ssl) + end + opts = if opts[:to] || opts[:step] || opts[:all], do: opts, |