summaryrefslogtreecommitdiff
path: root/lib/migrations
diff options
context:
space:
mode:
Diffstat (limited to 'lib/migrations')
-rw-r--r--lib/migrations/20160515114000-user-add-tokens.js22
-rw-r--r--lib/migrations/20160607060246-support-revision.js14
-rw-r--r--lib/migrations/20160703062241-support-authorship.js18
-rw-r--r--lib/migrations/20161009040430-support-delete-note.js8
-rw-r--r--lib/migrations/20161201050312-support-email-signin.js12
5 files changed, 29 insertions, 45 deletions
diff --git a/lib/migrations/20160515114000-user-add-tokens.js b/lib/migrations/20160515114000-user-add-tokens.js
index 3af490a9..20c0e03c 100644
--- a/lib/migrations/20160515114000-user-add-tokens.js
+++ b/lib/migrations/20160515114000-user-add-tokens.js
@@ -1,15 +1,11 @@
-"use strict";
-
module.exports = {
- up: function (queryInterface, Sequelize) {
- queryInterface.addColumn('Users', 'accessToken', Sequelize.STRING);
- queryInterface.addColumn('Users', 'refreshToken', Sequelize.STRING);
- return;
- },
+ up: function (queryInterface, Sequelize) {
+ queryInterface.addColumn('Users', 'accessToken', Sequelize.STRING)
+ queryInterface.addColumn('Users', 'refreshToken', Sequelize.STRING)
+ },
- down: function (queryInterface, Sequelize) {
- queryInterface.removeColumn('Users', 'accessToken');
- queryInterface.removeColumn('Users', 'refreshToken');
- return;
- }
-}; \ No newline at end of file
+ down: function (queryInterface, Sequelize) {
+ queryInterface.removeColumn('Users', 'accessToken')
+ queryInterface.removeColumn('Users', 'refreshToken')
+ }
+}
diff --git a/lib/migrations/20160607060246-support-revision.js b/lib/migrations/20160607060246-support-revision.js
index fa647d93..618bb4d7 100644
--- a/lib/migrations/20160607060246-support-revision.js
+++ b/lib/migrations/20160607060246-support-revision.js
@@ -1,8 +1,6 @@
-'use strict';
-
module.exports = {
up: function (queryInterface, Sequelize) {
- queryInterface.addColumn('Notes', 'savedAt', Sequelize.DATE);
+ queryInterface.addColumn('Notes', 'savedAt', Sequelize.DATE)
queryInterface.createTable('Revisions', {
id: {
type: Sequelize.UUID,
@@ -15,13 +13,11 @@ module.exports = {
length: Sequelize.INTEGER,
createdAt: Sequelize.DATE,
updatedAt: Sequelize.DATE
- });
- return;
+ })
},
down: function (queryInterface, Sequelize) {
- queryInterface.dropTable('Revisions');
- queryInterface.removeColumn('Notes', 'savedAt');
- return;
+ queryInterface.dropTable('Revisions')
+ queryInterface.removeColumn('Notes', 'savedAt')
}
-};
+}
diff --git a/lib/migrations/20160703062241-support-authorship.js b/lib/migrations/20160703062241-support-authorship.js
index 239327ec..98381d4e 100644
--- a/lib/migrations/20160703062241-support-authorship.js
+++ b/lib/migrations/20160703062241-support-authorship.js
@@ -1,9 +1,7 @@
-'use strict';
-
module.exports = {
up: function (queryInterface, Sequelize) {
- queryInterface.addColumn('Notes', 'authorship', Sequelize.TEXT);
- queryInterface.addColumn('Revisions', 'authorship', Sequelize.TEXT);
+ queryInterface.addColumn('Notes', 'authorship', Sequelize.TEXT)
+ queryInterface.addColumn('Revisions', 'authorship', Sequelize.TEXT)
queryInterface.createTable('Authors', {
id: {
type: Sequelize.INTEGER,
@@ -15,14 +13,12 @@ module.exports = {
userId: Sequelize.UUID,
createdAt: Sequelize.DATE,
updatedAt: Sequelize.DATE
- });
- return;
+ })
},
down: function (queryInterface, Sequelize) {
- queryInterface.dropTable('Authors');
- queryInterface.removeColumn('Revisions', 'authorship');
- queryInterface.removeColumn('Notes', 'authorship');
- return;
+ queryInterface.dropTable('Authors')
+ queryInterface.removeColumn('Revisions', 'authorship')
+ queryInterface.removeColumn('Notes', 'authorship')
}
-};
+}
diff --git a/lib/migrations/20161009040430-support-delete-note.js b/lib/migrations/20161009040430-support-delete-note.js
index 92ff6f7b..984920b8 100644
--- a/lib/migrations/20161009040430-support-delete-note.js
+++ b/lib/migrations/20161009040430-support-delete-note.js
@@ -1,11 +1,9 @@
-'use strict';
-
module.exports = {
up: function (queryInterface, Sequelize) {
- queryInterface.addColumn('Notes', 'deletedAt', Sequelize.DATE);
+ queryInterface.addColumn('Notes', 'deletedAt', Sequelize.DATE)
},
down: function (queryInterface, Sequelize) {
- queryInterface.removeColumn('Notes', 'deletedAt');
+ queryInterface.removeColumn('Notes', 'deletedAt')
}
-};
+}
diff --git a/lib/migrations/20161201050312-support-email-signin.js b/lib/migrations/20161201050312-support-email-signin.js
index b5aaf777..a97d3be5 100644
--- a/lib/migrations/20161201050312-support-email-signin.js
+++ b/lib/migrations/20161201050312-support-email-signin.js
@@ -1,13 +1,11 @@
-'use strict';
-
module.exports = {
up: function (queryInterface, Sequelize) {
- queryInterface.addColumn('Users', 'email', Sequelize.TEXT);
- queryInterface.addColumn('Users', 'password', Sequelize.TEXT);
+ queryInterface.addColumn('Users', 'email', Sequelize.TEXT)
+ queryInterface.addColumn('Users', 'password', Sequelize.TEXT)
},
down: function (queryInterface, Sequelize) {
- queryInterface.removeColumn('Users', 'email');
- queryInterface.removeColumn('Users', 'password');
+ queryInterface.removeColumn('Users', 'email')
+ queryInterface.removeColumn('Users', 'password')
}
-};
+}