mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-10-19 05:40:16 -04:00
30 lines
843 B
JavaScript
30 lines
843 B
JavaScript
'use strict'
|
|
module.exports = {
|
|
up: function (queryInterface, Sequelize) {
|
|
return queryInterface.addColumn('Notes', 'shortid', {
|
|
type: Sequelize.STRING,
|
|
unique: true,
|
|
allowNull: false
|
|
}).then(function () {
|
|
return queryInterface.addColumn('Notes', 'permission', {
|
|
type: Sequelize.STRING,
|
|
allowNull: false,
|
|
defaultValue: 0
|
|
})
|
|
}).then(function () {
|
|
return queryInterface.addColumn('Notes', 'viewcount', {
|
|
type: Sequelize.INTEGER
|
|
})
|
|
})
|
|
},
|
|
|
|
down: function (queryInterface, Sequelize) {
|
|
return queryInterface.removeColumn('Notes', 'viewcount')
|
|
.then(function () {
|
|
return queryInterface.removeColumn('Notes', 'permission')
|
|
})
|
|
.then(function () {
|
|
return queryInterface.removeColumn('Notes', 'shortid')
|
|
})
|
|
}
|
|
}
|