diff options
author | Wu Cheng-Han | 2017-01-02 11:00:40 +0800 |
---|---|---|
committer | Wu Cheng-Han | 2017-01-02 11:00:40 +0800 |
commit | c3a96ff112c8f7ea31af97fbc3319e782f4490e2 (patch) | |
tree | 32704e6412a636c564f327bd8581e9b0161bf264 /lib/migrations | |
parent | 99628a5662b0abcb396e78aad0f631071d9d1f61 (diff) |
Fix migration script of revision lacks of definition of primary key
Diffstat (limited to 'lib/migrations')
-rw-r--r-- | lib/migrations/20160607060246-support-revision.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/migrations/20160607060246-support-revision.js b/lib/migrations/20160607060246-support-revision.js index 9721d7fc..fa647d93 100644 --- a/lib/migrations/20160607060246-support-revision.js +++ b/lib/migrations/20160607060246-support-revision.js @@ -4,7 +4,10 @@ module.exports = { up: function (queryInterface, Sequelize) { queryInterface.addColumn('Notes', 'savedAt', Sequelize.DATE); queryInterface.createTable('Revisions', { - id: Sequelize.UUID, + id: { + type: Sequelize.UUID, + primaryKey: true + }, noteId: Sequelize.UUID, patch: Sequelize.TEXT, lastContent: Sequelize.TEXT, |