2017-03-14 05:02:43 +00:00
|
|
|
'use strict'
|
2016-07-30 03:21:38 +00:00
|
|
|
module.exports = {
|
|
|
|
up: function (queryInterface, Sequelize) {
|
2017-03-08 10:45:51 +00:00
|
|
|
queryInterface.addColumn('Notes', 'authorship', Sequelize.TEXT)
|
|
|
|
queryInterface.addColumn('Revisions', 'authorship', Sequelize.TEXT)
|
2016-07-30 03:21:38 +00:00
|
|
|
queryInterface.createTable('Authors', {
|
|
|
|
id: {
|
|
|
|
type: Sequelize.INTEGER,
|
|
|
|
primaryKey: true,
|
|
|
|
autoIncrement: true
|
|
|
|
},
|
|
|
|
color: Sequelize.STRING,
|
|
|
|
noteId: Sequelize.UUID,
|
|
|
|
userId: Sequelize.UUID,
|
|
|
|
createdAt: Sequelize.DATE,
|
|
|
|
updatedAt: Sequelize.DATE
|
2017-03-08 10:45:51 +00:00
|
|
|
})
|
2016-07-30 03:21:38 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
down: function (queryInterface, Sequelize) {
|
2017-03-08 10:45:51 +00:00
|
|
|
queryInterface.dropTable('Authors')
|
|
|
|
queryInterface.removeColumn('Revisions', 'authorship')
|
|
|
|
queryInterface.removeColumn('Notes', 'authorship')
|
2016-07-30 03:21:38 +00:00
|
|
|
}
|
2017-03-08 10:45:51 +00:00
|
|
|
}
|