mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-06-04 08:49:59 -04:00
fix: Add missing migration
This commit is contained in:
parent
b2985085d0
commit
6f14822413
7 changed files with 139 additions and 0 deletions
30
lib/migrations/20150702001020-update-to-0_3_1.js
Normal file
30
lib/migrations/20150702001020-update-to-0_3_1.js
Normal file
|
@ -0,0 +1,30 @@
|
|||
'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')
|
||||
})
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue