Fixes runtime error during `migrate.sh`:
** (UndefinedFunctionError) function ClickhouseEcto.lock_for_migrations/3 is undefined or private
The function `lock_for_migrations` indeed does not exist in the `ClickhouseEcto`
module packaged so far.
Reason:
So far we use the patch `ecto_sql-fix.patch` doing
- {:ecto_sql, "~> 3.0"},
+ {:ecto_sql, "~> 3.6"},
@scvalex found that the commit that makes the `plausible/clickhouse_ecto` fork
compatible with 3.6 is _newer_ than the commit pinned in the `.lock` file,
namely `1969f14ecef - Update for ecto 3.6.1`:
https://github.com/plausible/clickhouse_ecto/commit/1969f14ecef
That commit introduces the function that my error shows (`def lock_for_migrations`).
This means that the version that's in the lockfile (and pulled) was
incompatible with the version the nixpkgs patch forces.
This commit fixes it by patching the `.lock` file to have the version of
`plausible/clickhouse_ecto` that makes it compatible with `ecto_sql` 3.6.
Some discourse plugins have Ruby dependencies and require a
specialized builder. This introduces a generic builder that can be
used whether the plugin has Ruby dependencies or not. It also adds a
set of pre-packaged plugins available through `discourse.plugins` and
provides an easy way to add more.
For plugins to work properly, their assets need to be precompiled
along with the rest of Discourse's assets. This means we need to build
new packages when the list of plugins change.
* Most significant is probably the patching necessary to run plausible
with postgres without superuser privilege. This change includes:
* updating ecto_sql to 3.6 where `CREATE DATABASE` is only executed if
it doesn't exist[1].
* patching a migration to only modify the `users.email` column (to use
`citext` rather than creating the extension. `plausible-postgres`
takes care of that).
* Correctly declare dependencies in systemd.
* A few minor fixes.
[1] 051baf669e
includes fixes for:
* CVE-2021-29503: Improper Neutralization of Script-Related HTML Tags in Notes
* a potential XSS-vector in the handling of usernames and profile pictures
https://github.com/hedgedoc/hedgedoc/releases/tag/1.8.2