summaryrefslogtreecommitdiff
path: root/lib/migrations
diff options
context:
space:
mode:
authorBoHong Li2017-03-13 02:09:52 +0800
committerBoHong Li2017-03-13 02:09:52 +0800
commitbefa89be8b69ed1b951099828c5dbc7e550d4c68 (patch)
tree835b840c390029c596756a59abc919bf17d14b54 /lib/migrations
parent747da6772d339329ed130f5a0dbc896be5391ef8 (diff)
parent5bc642d02e8955b200bb21cf30e863fdf0c53765 (diff)
Merge branch 'use_javascript_standard_style'
Introduce JavaScript Standard Style Signed-off-by: BoHong Li <a60814billy@gmail.com>
Diffstat (limited to '')
-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')
}
-};
+}