mirror of
https://gitlab.com/Alamantus/Readlebee.git
synced 2025-05-20 17:11:15 +02:00
Update sqlite in setup-database.js
This commit is contained in:
parent
bee0bd7f5e
commit
755b718e15
2 changed files with 9 additions and 3 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -6,3 +6,5 @@ dev/
|
||||||
|
|
||||||
**/*.log
|
**/*.log
|
||||||
config.json
|
config.json
|
||||||
|
*.sqlite*
|
||||||
|
*.db
|
|
@ -16,8 +16,12 @@ const sequelizeConfig = {
|
||||||
switch (siteConfig.db_engine) {
|
switch (siteConfig.db_engine) {
|
||||||
case 'sqlite': {
|
case 'sqlite': {
|
||||||
sequelizeConfig.storage = typeof siteConfig.sqlite_location !== 'undefined'
|
sequelizeConfig.storage = typeof siteConfig.sqlite_location !== 'undefined'
|
||||||
? path.resolve(siteConfig.sqlite_location)
|
? (
|
||||||
: path.resolve(__dirname, './database.sqlite');
|
siteConfig.sqlite_location.substr(0, 1) === '.' // If relative path, make relative to ./server
|
||||||
|
? path.resolve('./server/', siteConfig.sqlite_location)
|
||||||
|
: path.resolve(siteConfig.sqlite_location)
|
||||||
|
)
|
||||||
|
: path.resolve(__dirname, './server/database.sqlite');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
|
|
Loading…
Add table
Reference in a new issue