diff options
author | Chocobozzz <me@florianbigard.com> | 2018-10-17 10:48:56 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-10-17 10:48:56 +0200 |
commit | bb5d90e62f631af3c899fbe586485e64938a5927 (patch) | |
tree | 8dc28c7027a52bed76bcc7e117da290ff7a58b6b /server/initializers/migrations/0280-webtorrent-policy-user.ts | |
parent | bcf21a376f1e26cb3e74236e4cc41909310d4c32 (diff) | |
parent | a73115f31ae891cb47759f075b1d2cead40817a4 (diff) | |
download | PeerTube-bb5d90e62f631af3c899fbe586485e64938a5927.tar.gz PeerTube-bb5d90e62f631af3c899fbe586485e64938a5927.tar.zst PeerTube-bb5d90e62f631af3c899fbe586485e64938a5927.zip |
Merge branch 'feature/webtorrent-disabling' into develop
Diffstat (limited to 'server/initializers/migrations/0280-webtorrent-policy-user.ts')
-rw-r--r-- | server/initializers/migrations/0280-webtorrent-policy-user.ts | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/server/initializers/migrations/0280-webtorrent-policy-user.ts b/server/initializers/migrations/0280-webtorrent-policy-user.ts new file mode 100644 index 000000000..e6488356a --- /dev/null +++ b/server/initializers/migrations/0280-webtorrent-policy-user.ts | |||
@@ -0,0 +1,28 @@ | |||
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<any> { | ||
8 | { | ||
9 | const data = { | ||
10 | type: Sequelize.BOOLEAN, | ||
11 | allowNull: false, | ||
12 | defaultValue: true | ||
13 | } | ||
14 | |||
15 | await utils.queryInterface.addColumn('user', 'webTorrentEnabled', data) | ||
16 | } | ||
17 | |||
18 | } | ||
19 | |||
20 | async function down (utils: { | ||
21 | transaction: Sequelize.Transaction | ||
22 | queryInterface: Sequelize.QueryInterface | ||
23 | sequelize: Sequelize.Sequelize | ||
24 | }): Promise<any> { | ||
25 | await utils.queryInterface.removeColumn('user', 'webTorrentEnabled') | ||
26 | } | ||
27 | |||
28 | export { up, down } | ||