summaryrefslogtreecommitdiff
path: root/lib/migrations/20180209120907-longtext-of-authorship.js
diff options
context:
space:
mode:
authorMax Wu2018-02-09 21:27:06 +0800
committerChristoph (Sheogorath) Kern2018-02-09 14:27:06 +0100
commitbb5e021f201c8ad83fe2736dee0faef123bfca50 (patch)
treef4573f2b4c00fe5a205e161aa128e6594923a952 /lib/migrations/20180209120907-longtext-of-authorship.js
parentdfa0851d8fda25e1af80e77c318037fac9e342f6 (diff)
Fix field type to prevent data truncation of authorship (#721)
* Fix field type to prevent data truncation of authorship
Diffstat (limited to 'lib/migrations/20180209120907-longtext-of-authorship.js')
-rw-r--r--lib/migrations/20180209120907-longtext-of-authorship.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/migrations/20180209120907-longtext-of-authorship.js b/lib/migrations/20180209120907-longtext-of-authorship.js
new file mode 100644
index 00000000..4cca5444
--- /dev/null
+++ b/lib/migrations/20180209120907-longtext-of-authorship.js
@@ -0,0 +1,13 @@
+'use strict'
+
+module.exports = {
+ up: function (queryInterface, Sequelize) {
+ queryInterface.changeColumn('Notes', 'authorship', {type: Sequelize.TEXT('long')})
+ queryInterface.changeColumn('Revisions', 'authorship', {type: Sequelize.TEXT('long')})
+ },
+
+ down: function (queryInterface, Sequelize) {
+ queryInterface.changeColumn('Notes', 'authorship', {type: Sequelize.TEXT})
+ queryInterface.changeColumn('Revisions', 'authorship', {type: Sequelize.TEXT})
+ }
+}