2016-06-17 08:09:33 +00:00
|
|
|
module.exports = {
|
|
|
|
up: function (queryInterface, Sequelize) {
|
2017-03-08 10:45:51 +00:00
|
|
|
queryInterface.addColumn('Notes', 'savedAt', Sequelize.DATE)
|
2016-06-17 08:09:33 +00:00
|
|
|
queryInterface.createTable('Revisions', {
|
2017-01-02 03:00:40 +00:00
|
|
|
id: {
|
|
|
|
type: Sequelize.UUID,
|
|
|
|
primaryKey: true
|
|
|
|
},
|
2016-06-17 08:09:33 +00:00
|
|
|
noteId: Sequelize.UUID,
|
|
|
|
patch: Sequelize.TEXT,
|
|
|
|
lastContent: Sequelize.TEXT,
|
|
|
|
content: Sequelize.TEXT,
|
|
|
|
length: Sequelize.INTEGER,
|
|
|
|
createdAt: Sequelize.DATE,
|
|
|
|
updatedAt: Sequelize.DATE
|
2017-03-08 10:45:51 +00:00
|
|
|
})
|
2016-06-17 08:09:33 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
down: function (queryInterface, Sequelize) {
|
2017-03-08 10:45:51 +00:00
|
|
|
queryInterface.dropTable('Revisions')
|
|
|
|
queryInterface.removeColumn('Notes', 'savedAt')
|
2016-06-17 08:09:33 +00:00
|
|
|
}
|
2017-03-08 10:45:51 +00:00
|
|
|
}
|