feat: ldap avatar support
This commit is contained in:
9
server/db/migrations-sqlite/2.5.122.js
Normal file
9
server/db/migrations-sqlite/2.5.122.js
Normal file
@@ -0,0 +1,9 @@
|
||||
exports.up = knex => {
|
||||
return knex.schema
|
||||
.createTable('userAvatars', table => {
|
||||
table.integer('id').primary()
|
||||
table.binary('data').notNullable()
|
||||
})
|
||||
}
|
||||
|
||||
exports.down = knex => { }
|
20
server/db/migrations/2.5.122.js
Normal file
20
server/db/migrations/2.5.122.js
Normal file
@@ -0,0 +1,20 @@
|
||||
/* global WIKI */
|
||||
|
||||
exports.up = knex => {
|
||||
const dbCompat = {
|
||||
blobLength: (WIKI.config.db.type === `mysql` || WIKI.config.db.type === `mariadb`),
|
||||
charset: (WIKI.config.db.type === `mysql` || WIKI.config.db.type === `mariadb`)
|
||||
}
|
||||
return knex.schema
|
||||
.createTable('userAvatars', table => {
|
||||
if (dbCompat.charset) { table.charset('utf8mb4') }
|
||||
table.integer('id').primary()
|
||||
if (dbCompat.blobLength) {
|
||||
table.specificType('data', 'LONGBLOB').notNullable()
|
||||
} else {
|
||||
table.binary('data').notNullable()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
exports.down = knex => { }
|
Reference in New Issue
Block a user