diff options
Diffstat (limited to 'server/initializers/migrations/0675-p2p-enabled.ts')
-rw-r--r-- | server/initializers/migrations/0675-p2p-enabled.ts | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/server/initializers/migrations/0675-p2p-enabled.ts b/server/initializers/migrations/0675-p2p-enabled.ts new file mode 100644 index 000000000..b4f53381e --- /dev/null +++ b/server/initializers/migrations/0675-p2p-enabled.ts | |||
@@ -0,0 +1,21 @@ | |||
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 | db: any | ||
8 | }): Promise<void> { | ||
9 | await utils.queryInterface.renameColumn('user', 'webTorrentEnabled', 'p2pEnabled') | ||
10 | |||
11 | await utils.sequelize.query('ALTER TABLE "user" ALTER COLUMN "p2pEnabled" DROP DEFAULT') | ||
12 | } | ||
13 | |||
14 | function down (options) { | ||
15 | throw new Error('Not implemented.') | ||
16 | } | ||
17 | |||
18 | export { | ||
19 | up, | ||
20 | down | ||
21 | } | ||