mirror of
https://github.com/status-im/codimd.git
synced 2025-01-12 11:34:16 +00:00
147c20064f
Signed-off-by: Raccoon <raccoon@hackmd.io>
26 lines
737 B
TypeScript
26 lines
737 B
TypeScript
import {isSQLite} from "../utils";
|
|
|
|
export = {
|
|
up: function (queryInterface, Sequelize) {
|
|
return queryInterface.changeColumn('Notes', 'title', {
|
|
type: Sequelize.TEXT
|
|
}).then(function () {
|
|
if (isSQLite(queryInterface.sequelize)) {
|
|
// 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 () {
|
|
if (isSQLite(queryInterface.sequelize)) {
|
|
// manual added index will be removed in sqlite
|
|
return queryInterface.addIndex('Notes', ['shortid'])
|
|
}
|
|
})
|
|
}
|
|
}
|