feat: delete page
This commit is contained in:
@@ -5,6 +5,8 @@ const Promise = require('bluebird')
|
||||
const Knex = require('knex')
|
||||
const Objection = require('objection')
|
||||
|
||||
const migrationSource = require('../db/migrator-source')
|
||||
|
||||
/* global WIKI */
|
||||
|
||||
/**
|
||||
@@ -89,12 +91,14 @@ module.exports = {
|
||||
|
||||
// Set init tasks
|
||||
|
||||
console.info(migrationSource)
|
||||
|
||||
let initTasks = {
|
||||
// -> Migrate DB Schemas
|
||||
async syncSchemas() {
|
||||
return self.knex.migrate.latest({
|
||||
directory: path.join(WIKI.SERVERPATH, 'db/migrations'),
|
||||
tableName: 'migrations'
|
||||
tableName: 'migrations',
|
||||
migrationSource
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@@ -1,6 +1,8 @@
|
||||
const _ = require('lodash')
|
||||
const cfgHelper = require('../helpers/config')
|
||||
const Promise = require('bluebird')
|
||||
const fs = require('fs-extra')
|
||||
const path = require('path')
|
||||
|
||||
/* global WIKI */
|
||||
|
||||
@@ -22,6 +24,9 @@ module.exports = {
|
||||
}
|
||||
})
|
||||
|
||||
// Clear content cache
|
||||
fs.emptyDir(path.join(WIKI.ROOTPATH, 'data/cache'))
|
||||
|
||||
return this
|
||||
},
|
||||
/**
|
||||
|
Reference in New Issue
Block a user