diff options
author | Chocobozzz <me@florianbigard.com> | 2019-01-10 15:39:51 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-01-10 15:39:51 +0100 |
commit | 5abb9fbbd12e7097e348d6a38622d364b1fa47ed (patch) | |
tree | 8ef483ad15bd76c75876e0e2f34fd3c99b786103 /server/initializers | |
parent | 93f85e90ffa27453e2c909406b62bef65963b8ad (diff) | |
download | PeerTube-5abb9fbbd12e7097e348d6a38622d364b1fa47ed.tar.gz PeerTube-5abb9fbbd12e7097e348d6a38622d364b1fa47ed.tar.zst PeerTube-5abb9fbbd12e7097e348d6a38622d364b1fa47ed.zip |
Add ability to unfederate a local video (on blacklist)
Diffstat (limited to 'server/initializers')
-rw-r--r-- | server/initializers/constants.ts | 2 | ||||
-rw-r--r-- | server/initializers/migrations/0320-blacklist-unfederate.ts | 27 |
2 files changed, 28 insertions, 1 deletions
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index 4a88aef87..b18884eeb 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts | |||
@@ -16,7 +16,7 @@ let config: IConfig = require('config') | |||
16 | 16 | ||
17 | // --------------------------------------------------------------------------- | 17 | // --------------------------------------------------------------------------- |
18 | 18 | ||
19 | const LAST_MIGRATION_VERSION = 315 | 19 | const LAST_MIGRATION_VERSION = 320 |
20 | 20 | ||
21 | // --------------------------------------------------------------------------- | 21 | // --------------------------------------------------------------------------- |
22 | 22 | ||
diff --git a/server/initializers/migrations/0320-blacklist-unfederate.ts b/server/initializers/migrations/0320-blacklist-unfederate.ts new file mode 100644 index 000000000..6fb7bbb90 --- /dev/null +++ b/server/initializers/migrations/0320-blacklist-unfederate.ts | |||
@@ -0,0 +1,27 @@ | |||
1 | import * as Sequelize from 'sequelize' | ||
2 | |||
3 | async function up (utils: { | ||
4 | transaction: Sequelize.Transaction, | ||
5 | queryInterface: Sequelize.QueryInterface, | ||
6 | sequelize: Sequelize.Sequelize | ||
7 | }): Promise<void> { | ||
8 | |||
9 | { | ||
10 | const data = { | ||
11 | type: Sequelize.BOOLEAN, | ||
12 | allowNull: false, | ||
13 | defaultValue: false | ||
14 | } | ||
15 | |||
16 | await utils.queryInterface.addColumn('videoBlacklist', 'unfederated', data) | ||
17 | } | ||
18 | } | ||
19 | |||
20 | function down (options) { | ||
21 | throw new Error('Not implemented.') | ||
22 | } | ||
23 | |||
24 | export { | ||
25 | up, | ||
26 | down | ||
27 | } | ||