aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers/migrations/0005-email-pod.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-03-21 14:54:29 +0100
committerChocobozzz <me@florianbigard.com>2022-03-21 14:54:29 +0100
commit348c2ce3ff3fe2f25a31f08bfb36c88723a0ce46 (patch)
tree972ec51091bab14e7671ef7db3b6e43ea5f116f7 /server/initializers/migrations/0005-email-pod.ts
parente6afb669402aead6bf3d9d7ba4f2bd434c831eab (diff)
downloadPeerTube-348c2ce3ff3fe2f25a31f08bfb36c88723a0ce46.tar.gz
PeerTube-348c2ce3ff3fe2f25a31f08bfb36c88723a0ce46.tar.zst
PeerTube-348c2ce3ff3fe2f25a31f08bfb36c88723a0ce46.zip
Remove old migration files
Diffstat (limited to 'server/initializers/migrations/0005-email-pod.ts')
-rw-r--r--server/initializers/migrations/0005-email-pod.ts36
1 files changed, 0 insertions, 36 deletions
diff --git a/server/initializers/migrations/0005-email-pod.ts b/server/initializers/migrations/0005-email-pod.ts
deleted file mode 100644
index 025bcdb59..000000000
--- a/server/initializers/migrations/0005-email-pod.ts
+++ /dev/null
@@ -1,36 +0,0 @@
1import * as Sequelize from 'sequelize'
2import { Migration } from '../../models/migrations'
3
4function up (utils: {
5 transaction: Sequelize.Transaction
6 queryInterface: Sequelize.QueryInterface
7 sequelize: Sequelize.Sequelize
8}): Promise<void> {
9 const q = utils.queryInterface
10
11 const data = {
12 type: Sequelize.STRING(400),
13 allowNull: false,
14 defaultValue: ''
15 } as Migration.String
16
17 return q.addColumn('Pods', 'email', data)
18 .then(() => {
19 const query = 'UPDATE "Pods" SET "email" = \'dummy@example.com\''
20 return utils.sequelize.query(query, { transaction: utils.transaction })
21 })
22 .then(() => {
23 data.defaultValue = null
24
25 return q.changeColumn('Pods', 'email', data)
26 })
27}
28
29function down (options) {
30 throw new Error('Not implemented.')
31}
32
33export {
34 up,
35 down
36}