Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wiki-js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
wiki-js
Commits
8d1f7526
Unverified
Commit
8d1f7526
authored
Sep 25, 2021
by
Frederic Alix
Committed by
GitHub
Sep 24, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: add possibility to set PostgreSQL schema other than public (#4161)
parent
66bf9147
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
config.sample.yml
config.sample.yml
+3
-0
db.js
server/core/db.js
+4
-0
No files found.
config.sample.yml
View file @
8d1f7526
...
...
@@ -43,6 +43,9 @@ db:
# pfx: path/to/cert.pfx
# passphrase: xyz123
# Optional - PostgreSQL only:
schema
:
public
# SQLite only:
storage
:
path/to/database.sqlite
...
...
server/core/db.js
View file @
8d1f7526
...
...
@@ -138,6 +138,10 @@ module.exports = {
switch
(
WIKI
.
config
.
db
.
type
)
{
case
'postgres'
:
await
conn
.
query
(
`set application_name = 'Wiki.js'`
)
// -> Set schema if it's not public
if
(
WIKI
.
config
.
db
.
schema
&&
WIKI
.
config
.
db
.
schema
!==
'public'
)
{
await
conn
.
query
(
`set search_path TO
${
WIKI
.
config
.
db
.
schema
}
, public;`
)
}
done
()
break
case
'mysql'
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment