Fix migration for Servers table

This commit is contained in:
Chocobozzz 2017-11-28 10:00:02 +01:00
parent 5e3bb76cb6
commit eb7a06c812
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
3 changed files with 41 additions and 1 deletions

View File

@ -14,7 +14,7 @@ import { FollowState } from '../../shared/models/accounts/follow.model'
// ---------------------------------------------------------------------------
const LAST_MIGRATION_VERSION = 100
const LAST_MIGRATION_VERSION = 110
// ---------------------------------------------------------------------------

View File

@ -0,0 +1,20 @@
import * as Sequelize from 'sequelize'
import { PeerTubeDatabase } from '../database'
async function up (utils: {
transaction: Sequelize.Transaction,
queryInterface: Sequelize.QueryInterface,
sequelize: Sequelize.Sequelize,
db: PeerTubeDatabase
}): Promise<void> {
await utils.queryInterface.removeColumn('Servers', 'email')
}
function down (options) {
throw new Error('Not implemented.')
}
export {
up,
down
}

View File

@ -0,0 +1,20 @@
import * as Sequelize from 'sequelize'
import { PeerTubeDatabase } from '../database'
async function up (utils: {
transaction: Sequelize.Transaction,
queryInterface: Sequelize.QueryInterface,
sequelize: Sequelize.Sequelize,
db: PeerTubeDatabase
}): Promise<void> {
await utils.queryInterface.removeColumn('Servers', 'publicKey')
}
function down (options) {
throw new Error('Not implemented.')
}
export {
up,
down
}