diff options
author | Chocobozzz <me@florianbigard.com> | 2018-07-26 10:45:10 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-07-26 11:02:04 +0200 |
commit | 2cebd797014561ebc0bfee07ee8b5d83820adb66 (patch) | |
tree | fe912e29c7321c3c29e94691520615a741899e71 /server/initializers/database.ts | |
parent | c1e791bad0b079af67398f6407221e6dcbb573dd (diff) | |
download | PeerTube-2cebd797014561ebc0bfee07ee8b5d83820adb66.tar.gz PeerTube-2cebd797014561ebc0bfee07ee8b5d83820adb66.tar.zst PeerTube-2cebd797014561ebc0bfee07ee8b5d83820adb66.zip |
Fix last commit
Diffstat (limited to 'server/initializers/database.ts')
-rw-r--r-- | server/initializers/database.ts | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/server/initializers/database.ts b/server/initializers/database.ts index d95e34bce..1a9ce5a61 100644 --- a/server/initializers/database.ts +++ b/server/initializers/database.ts | |||
@@ -125,10 +125,11 @@ async function checkPostgresExtensions () { | |||
125 | } | 125 | } |
126 | 126 | ||
127 | async function createFunctions () { | 127 | async function createFunctions () { |
128 | const query = `CREATE OR REPLACE FUNCTION immutable_unaccent(varchar) | 128 | const query = `CREATE OR REPLACE FUNCTION immutable_unaccent(text) |
129 | RETURNS text AS $$ | 129 | RETURNS text AS |
130 | SELECT unaccent($1) | 130 | $func$ |
131 | $$ LANGUAGE sql IMMUTABLE;` | 131 | SELECT public.unaccent('public.unaccent', $1::text) |
132 | $func$ LANGUAGE sql IMMUTABLE;` | ||
132 | 133 | ||
133 | return sequelizeTypescript.query(query, { raw: true }) | 134 | return sequelizeTypescript.query(query, { raw: true }) |
134 | } | 135 | } |