fix: setup assets location + mysql migration 2.4.13

This commit is contained in:
NGPixel
2020-05-31 22:39:45 -04:00
parent d19bf6cce0
commit 3891816758
5 changed files with 29 additions and 19 deletions

View File

@@ -1,10 +1,20 @@
/* global WIKI */
exports.up = knex => {
return knex.schema
.alterTable('pages', table => {
table.json('extra').notNullable().defaultTo('{}')
if (WIKI.config.db.type === 'mysql') {
table.json('extra')
} else {
table.json('extra').notNullable().defaultTo('{}')
}
})
.alterTable('pageHistory', table => {
table.json('extra').notNullable().defaultTo('{}')
if (WIKI.config.db.type === 'mysql') {
table.json('extra')
} else {
table.json('extra').notNullable().defaultTo('{}')
}
})
.alterTable('users', table => {
table.string('dateFormat').notNullable().defaultTo('')

View File

@@ -34,7 +34,7 @@ module.exports = () => {
// ----------------------------------------
app.use(favicon(path.join(WIKI.ROOTPATH, 'assets', 'favicon.ico')))
app.use(express.static(path.join(WIKI.ROOTPATH, 'assets')))
app.use('/_assets', express.static(path.join(WIKI.ROOTPATH, 'assets')))
// ----------------------------------------
// View Engine Setup