From 1ebddadd0704812a4600c39cabe2268321e88331 Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Mon, 22 Jun 2020 13:00:39 +0200 Subject: predefined report reasons & improved reporter UI (#2842) - added `startAt` and `endAt` optional timestamps to help pin down reported sections of a video - added predefined report reasons - added video player with report modal --- .../0515-video-abuse-reason-timestamps.ts | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 server/initializers/migrations/0515-video-abuse-reason-timestamps.ts (limited to 'server/initializers/migrations/0515-video-abuse-reason-timestamps.ts') diff --git a/server/initializers/migrations/0515-video-abuse-reason-timestamps.ts b/server/initializers/migrations/0515-video-abuse-reason-timestamps.ts new file mode 100644 index 000000000..c58335617 --- /dev/null +++ b/server/initializers/migrations/0515-video-abuse-reason-timestamps.ts @@ -0,0 +1,31 @@ +import * as Sequelize from 'sequelize' + +async function up (utils: { + transaction: Sequelize.Transaction + queryInterface: Sequelize.QueryInterface + sequelize: Sequelize.Sequelize +}): Promise { + await utils.queryInterface.addColumn('videoAbuse', 'predefinedReasons', { + type: Sequelize.ARRAY(Sequelize.INTEGER), + allowNull: true + }) + + await utils.queryInterface.addColumn('videoAbuse', 'startAt', { + type: Sequelize.INTEGER, + allowNull: true + }) + + await utils.queryInterface.addColumn('videoAbuse', 'endAt', { + type: Sequelize.INTEGER, + allowNull: true + }) +} + +function down (options) { + throw new Error('Not implemented.') +} + +export { + up, + down +} -- cgit v1.2.3