From 4dc7e0537306f78a7b3a6c27c64de02615bf34c2 Mon Sep 17 00:00:00 2001 From: NGPixel Date: Sun, 26 Jan 2020 20:57:30 -0500 Subject: [PATCH] fix: migration for pageHistory content column type --- server/db/migrations/2.1.85.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 server/db/migrations/2.1.85.js diff --git a/server/db/migrations/2.1.85.js b/server/db/migrations/2.1.85.js new file mode 100644 index 00000000..9ab00f94 --- /dev/null +++ b/server/db/migrations/2.1.85.js @@ -0,0 +1,19 @@ +/* global WIKI */ + +exports.up = knex => { + return knex.schema + .alterTable('pageHistory', table => { + switch (WIKI.config.db.type) { + // No change needed for PostgreSQL and SQLite + case 'mariadb': + case 'mysql': + table.specificType('content', 'LONGTEXT').alter() + break + case 'mssql': + table.specificType('content', 'VARCHAR(max)').alter() + break + } + }) +} + +exports.down = knex => { }