Add auto play next video migration

This commit is contained in:
Chocobozzz 2019-09-24 10:35:36 +02:00
parent c1e5bd23d5
commit 85c1df6ae8
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
3 changed files with 30 additions and 1 deletions

View File

@ -47,7 +47,9 @@
inputName="autoPlayVideo" formControlName="autoPlayVideo"
i18n-labelText labelText="Automatically plays video"
></my-peertube-checkbox>
</div>
<div class="form-group">
<my-peertube-checkbox
inputName="autoPlayNextVideo" formControlName="autoPlayNextVideo"
i18n-labelText labelText="Automatically starts playing next video"

View File

@ -14,7 +14,7 @@ import { CONFIG, registerConfigChangedHandler } from './config'
// ---------------------------------------------------------------------------
const LAST_MIGRATION_VERSION = 435
const LAST_MIGRATION_VERSION = 440
// ---------------------------------------------------------------------------

View File

@ -0,0 +1,27 @@
import * as Sequelize from 'sequelize'
async function up (utils: {
transaction: Sequelize.Transaction,
queryInterface: Sequelize.QueryInterface,
sequelize: Sequelize.Sequelize,
db: any
}): Promise<void> {
{
const data = {
type: Sequelize.BOOLEAN,
allowNull: false,
defaultValue: false
}
await utils.queryInterface.addColumn('user', 'autoPlayNextVideo', data)
}
}
function down (options) {
throw new Error('Not implemented.')
}
export {
up,
down
}