Use JavaScript Standard Style
Introduce JavaScript Standard Style as project style rule, and fixed all fail on backend code.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
};
|
||||
down: function (queryInterface, Sequelize) {
|
||||
queryInterface.removeColumn('Users', 'accessToken')
|
||||
queryInterface.removeColumn('Users', 'refreshToken')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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')
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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')
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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')
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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')
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user