Add simple count of views to share links (#4036)
* Add simple count of views to share links * Remove no longer applicable tests * Avoid incrementing view count for known bots
This commit is contained in:
13
server/migrations/20220830215146-add-shares-views.js
Normal file
13
server/migrations/20220830215146-add-shares-views.js
Normal file
@@ -0,0 +1,13 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
up: async (queryInterface, Sequelize) => {
|
||||
await queryInterface.addColumn("shares", "views", {
|
||||
type: Sequelize.INTEGER,
|
||||
defaultValue: 0
|
||||
});
|
||||
},
|
||||
down: async (queryInterface) => {
|
||||
await queryInterface.removeColumn("shares", "views");
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user