summaryrefslogtreecommitdiff
path: root/lib/migrations/20150915153700-change-notes-title-to-text.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/migrations/20150915153700-change-notes-title-to-text.js')
-rw-r--r--lib/migrations/20150915153700-change-notes-title-to-text.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/migrations/20150915153700-change-notes-title-to-text.js b/lib/migrations/20150915153700-change-notes-title-to-text.js
index 6f7307d1..2b3a82bf 100644
--- a/lib/migrations/20150915153700-change-notes-title-to-text.js
+++ b/lib/migrations/20150915153700-change-notes-title-to-text.js
@@ -3,12 +3,17 @@ module.exports = {
up: function (queryInterface, Sequelize) {
return queryInterface.changeColumn('Notes', 'title', {
type: Sequelize.TEXT
+ }).then(function () {
+ // manual added index will be removed in sqlite
+ return queryInterface.addIndex('Notes', ['shortid'])
})
},
down: function (queryInterface, Sequelize) {
return queryInterface.changeColumn('Notes', 'title', {
type: Sequelize.STRING
+ }).then(function () {
+ return queryInterface.addIndex('Notes', ['shortid'])
})
}
}