summaryrefslogtreecommitdiff
path: root/lib/migrations/20150508114741-create-notes.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/migrations/20150508114741-create-notes.js')
-rw-r--r--lib/migrations/20150508114741-create-notes.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/migrations/20150508114741-create-notes.js b/lib/migrations/20150508114741-create-notes.js
new file mode 100644
index 00000000..660d40a6
--- /dev/null
+++ b/lib/migrations/20150508114741-create-notes.js
@@ -0,0 +1,21 @@
+'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')
+ }
+}