summaryrefslogtreecommitdiff
path: root/lib/migrations
diff options
context:
space:
mode:
authorWu Cheng-Han2017-01-02 11:00:40 +0800
committerWu Cheng-Han2017-01-02 11:00:40 +0800
commitc3a96ff112c8f7ea31af97fbc3319e782f4490e2 (patch)
tree32704e6412a636c564f327bd8581e9b0161bf264 /lib/migrations
parent99628a5662b0abcb396e78aad0f631071d9d1f61 (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.js5
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,