plausible: remove create extension patch

Turns out this isn't needed if the module correctly adds the `citext`
extension to the `plausible` database.
This commit is contained in:
Maximilian Bosch 2021-06-02 11:48:02 +02:00 committed by Raphael Megzari
parent cc88797ce0
commit c4afcbb77e
2 changed files with 4 additions and 20 deletions

View file

@ -27,6 +27,10 @@ let
pname = "${pname}-deps";
inherit src version;
sha256 = "18h3hs69nw06msvs3nnymf6p94qd3x1f4d2zawqriy9fr5fz7zx6";
# We need ecto 3.6 as this version checks whether the database exists before
# trying to create it. The creation attempt would always require super-user privileges
# and since 3.6 this isn't the case anymore.
patches = [ ./ecto_sql-fix.patch ];
};
@ -62,10 +66,6 @@ beamPackages.mixRelease {
# Ensure that `tzdata` doesn't write into its store-path
# https://github.com/plausible/analytics/pull/1096, but rebased onto 1.3.0
./tzdata-rebased.patch
# CREATE EXTENSION requires super-user privileges. To avoid that, we just skip
# the responsible SQL statement here and take care of it in the module.
./skip-create-ext.patch
];
passthru = {

View file

@ -1,16 +0,0 @@
diff --git a/priv/repo/migrations/20190430140411_use_citext_for_email.exs b/priv/repo/migrations/20190430140411_use_citext_for_email.exs
index ecb6f80..f3bf12f 100644
--- a/priv/repo/migrations/20190430140411_use_citext_for_email.exs
+++ b/priv/repo/migrations/20190430140411_use_citext_for_email.exs
@@ -2,10 +2,6 @@ defmodule Plausible.Repo.Migrations.UseCitextForEmail do
use Ecto.Migration
def change do
- execute "CREATE EXTENSION IF NOT EXISTS citext;"
-
- alter table(:users) do
- modify :email, :citext, null: false
- end
+ execute "ALTER TABLE users ALTER COLUMN email TYPE citext;"
end
end