Browse Source

fix: mysql setup fails during table reset

pull/1176/head
NGPixel 5 years ago
parent
commit
0efbd49adf
1 changed files with 2 additions and 2 deletions
  1. 4
      server/setup.js

4
server/setup.js

@ -199,8 +199,8 @@ module.exports = () => {
case 'mariadb':
await WIKI.models.groups.query().where('id', '>', 0).del()
await WIKI.models.users.query().where('id', '>', 0).del()
await WIKI.models.knex.raw('ALTER TABLE groups AUTO_INCREMENT = 1')
await WIKI.models.knex.raw('ALTER TABLE users AUTO_INCREMENT = 1')
await WIKI.models.knex.raw('ALTER TABLE `groups` AUTO_INCREMENT = 1')
await WIKI.models.knex.raw('ALTER TABLE `users` AUTO_INCREMENT = 1')
break
case 'mssql':
await WIKI.models.groups.query().del()

Loading…
Cancel
Save