feat: admin comments page

This commit is contained in:
NGPixel
2020-04-06 22:21:42 -04:00
committed by Nicolas Giard
parent bb21f6ed3e
commit 1def5289af
14 changed files with 514 additions and 39 deletions

View File

@@ -0,0 +1,10 @@
exports.up = knex => {
return knex.schema
.createTable('commentProviders', table => {
table.string('key').notNullable().primary()
table.boolean('isEnabled').notNullable().defaultTo(false)
table.json('config').notNullable()
})
}
exports.down = knex => { }

View File

@@ -0,0 +1,16 @@
/* global WIKI */
exports.up = knex => {
const dbCompat = {
charset: (WIKI.config.db.type === `mysql` || WIKI.config.db.type === `mariadb`)
}
return knex.schema
.createTable('commentProviders', table => {
if (dbCompat.charset) { table.charset('utf8mb4') }
table.string('key').notNullable().primary()
table.boolean('isEnabled').notNullable().defaultTo(false)
table.json('config').notNullable()
})
}
exports.down = knex => { }