git.iko.soy/typeable/nixpkgs
on master help sign in
plausible: remove create extension patch

Turns out this isn't needed if the module correctly adds the `citext` extension to the `plausible` database.

commitc4afcbb77ecaa57534bdf4c827bd8fcdd23b505a authorMaximilian Bosch <maximilian@mbosch.me> dateWed 2 Jun 2021, 11:48 (5 years ago) parentcc88797
2 files changed+4−20
pkgs/servers/web-apps/plausible/default.nix+4−4 pkgs/servers/web-apps/plausible/skip-create-ext.patch−16
pkgs/servers/web-apps/plausible/default.nix+4−4
@@ -27,6 +27,10 @@ let
2727 pname = "${pname}-deps";
2828 inherit src version;
2929 sha256 = "18h3hs69nw06msvs3nnymf6p94qd3x1f4d2zawqriy9fr5fz7zx6";
30+
31+ # We need ecto 3.6 as this version checks whether the database exists before
32+ # trying to create it. The creation attempt would always require super-user privileges
33+ # and since 3.6 this isn't the case anymore.
3034 patches = [ ./ecto_sql-fix.patch ];
3135 };
3236
@@ -62,10 +66,6 @@ beamPackages.mixRelease {
6266 # Ensure that `tzdata` doesn't write into its store-path
6367 # https://github.com/plausible/analytics/pull/1096, but rebased onto 1.3.0
6468 ./tzdata-rebased.patch
65−
66− # CREATE EXTENSION requires super-user privileges. To avoid that, we just skip
67− # the responsible SQL statement here and take care of it in the module.
68− ./skip-create-ext.patch
6969 ];
7070
7171 passthru = {
pkgs/servers/web-apps/plausible/skip-create-ext.patchdeleted−16
@@ -1,16 +0,0 @@
1−diff --git a/priv/repo/migrations/20190430140411_use_citext_for_email.exs b/priv/repo/migrations/20190430140411_use_citext_for_email.exs
2−index ecb6f80..f3bf12f 100644
3−--- a/priv/repo/migrations/20190430140411_use_citext_for_email.exs
4−+++ b/priv/repo/migrations/20190430140411_use_citext_for_email.exs
5−@@ -2,10 +2,6 @@ defmodule Plausible.Repo.Migrations.UseCitextForEmail do
6− use Ecto.Migration
7−
8− def change do
9−- execute "CREATE EXTENSION IF NOT EXISTS citext;"
10−-
11−- alter table(:users) do
12−- modify :email, :citext, null: false
13−- end
14−+ execute "ALTER TABLE users ALTER COLUMN email TYPE citext;"
15− end
16− end