Fix migration script of revision lacks of definition of primary key

This commit is contained in:
Wu Cheng-Han 2017-01-02 11:00:40 +08:00
parent 99628a5662
commit c3a96ff112
1 changed files with 4 additions and 1 deletions

View File

@ -4,7 +4,10 @@ module.exports = {
up: function (queryInterface, Sequelize) { up: function (queryInterface, Sequelize) {
queryInterface.addColumn('Notes', 'savedAt', Sequelize.DATE); queryInterface.addColumn('Notes', 'savedAt', Sequelize.DATE);
queryInterface.createTable('Revisions', { queryInterface.createTable('Revisions', {
id: Sequelize.UUID, id: {
type: Sequelize.UUID,
primaryKey: true
},
noteId: Sequelize.UUID, noteId: Sequelize.UUID,
patch: Sequelize.TEXT, patch: Sequelize.TEXT,
lastContent: Sequelize.TEXT, lastContent: Sequelize.TEXT,