HackMD/lib/migrations/20150508114741-create-notes.js

22 lines
511 B
JavaScript
Raw Permalink Normal View History

2017-03-27 11:23:00 +00:00
'use strict'
module.exports = {
up: function (queryInterface, Sequelize) {
return queryInterface.createTable('Notes', {
id: {
type: Sequelize.UUID,
primaryKey: true,
defaultValue: Sequelize.UUIDV4
},
ownerId: Sequelize.UUID,
content: Sequelize.TEXT,
title: Sequelize.STRING,
createdAt: Sequelize.DATE,
updatedAt: Sequelize.DATE
})
},
down: function (queryInterface, Sequelize) {
return queryInterface.dropTable('Notes')
}
}