mirror of https://github.com/Requarks/wiki.git
NGPixel
4 years ago
6 changed files with 111 additions and 11 deletions
Unified View
Diff Options
-
2client/components/common/nav-header.vue
-
22server/controllers/common.js
-
9server/db/migrations-sqlite/2.5.122.js
-
20server/db/migrations/2.5.122.js
-
64server/models/users.js
-
5server/modules/authentication/ldap/authentication.js
@ -0,0 +1,9 @@ |
|||||
|
exports.up = knex => { |
||||
|
return knex.schema |
||||
|
.createTable('userAvatars', table => { |
||||
|
table.integer('id').primary() |
||||
|
table.binary('data').notNullable() |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
exports.down = knex => { } |
@ -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 => { } |
Write
Preview
Loading…
Cancel
Save