aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers/migrations/0260-upload-quota-daily.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-09-26 14:08:35 +0200
committerChocobozzz <me@florianbigard.com>2018-09-26 14:08:35 +0200
commit2e7cf5ae0cf8fbc9526742b67a0079d42211644c (patch)
tree5a7ad1a7c7033f3b6f894be8cfecb2af8f337da4 /server/initializers/migrations/0260-upload-quota-daily.ts
parent60e74f80d87cdb366a70a48e4316bb0dff4cab16 (diff)
downloadPeerTube-2e7cf5ae0cf8fbc9526742b67a0079d42211644c.tar.gz
PeerTube-2e7cf5ae0cf8fbc9526742b67a0079d42211644c.tar.zst
PeerTube-2e7cf5ae0cf8fbc9526742b67a0079d42211644c.zip
Fix video files duplicated when fps is null
Null values are not considered equal in a UNIQUE index
Diffstat (limited to 'server/initializers/migrations/0260-upload-quota-daily.ts')
-rw-r--r--server/initializers/migrations/0260-upload-quota-daily.ts23
1 files changed, 23 insertions, 0 deletions
diff --git a/server/initializers/migrations/0260-upload-quota-daily.ts b/server/initializers/migrations/0260-upload-quota-daily.ts
new file mode 100644
index 000000000..d25154ba6
--- /dev/null
+++ b/server/initializers/migrations/0260-upload-quota-daily.ts
@@ -0,0 +1,23 @@
1import * as Sequelize from 'sequelize'
2import { CONSTRAINTS_FIELDS } from '../constants'
3
4async function up (utils: {
5 transaction: Sequelize.Transaction
6 queryInterface: Sequelize.QueryInterface
7 sequelize: Sequelize.Sequelize
8}): Promise<any> {
9 {
10 const data = {
11 type: Sequelize.BIGINT,
12 allowNull: false,
13 defaultValue: -1
14 }
15 await utils.queryInterface.addColumn('user', 'videoQuotaDaily', data)
16 }
17}
18
19function down (options) {
20 throw new Error('Not implemented.')
21}
22
23export { up, down }