hedgedoc/old_src/lib/migrations/20150508114741-create-notes.js
David Mehren 7b9f9a487b
Move old backend code to old_src folder
Signed-off-by: David Mehren <git@herrmehren.de>
2020-08-20 19:43:05 +02:00

21 lines
523 B
JavaScript

'use strict'
module.exports = {
up: async 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: async function (queryInterface, Sequelize) {
return queryInterface.dropTable('Notes')
}
}