diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index 786334d46..f09422ffd 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts @@ -14,7 +14,7 @@ import { FollowState } from '../../shared/models/accounts/follow.model' // --------------------------------------------------------------------------- -const LAST_MIGRATION_VERSION = 100 +const LAST_MIGRATION_VERSION = 110 // --------------------------------------------------------------------------- diff --git a/server/initializers/migrations/0105-server-mail.ts b/server/initializers/migrations/0105-server-mail.ts new file mode 100644 index 000000000..5836992d5 --- /dev/null +++ b/server/initializers/migrations/0105-server-mail.ts @@ -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 { + await utils.queryInterface.removeColumn('Servers', 'email') +} + +function down (options) { + throw new Error('Not implemented.') +} + +export { + up, + down +} diff --git a/server/initializers/migrations/0110-server-key.ts b/server/initializers/migrations/0110-server-key.ts new file mode 100644 index 000000000..560353945 --- /dev/null +++ b/server/initializers/migrations/0110-server-key.ts @@ -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 { + await utils.queryInterface.removeColumn('Servers', 'publicKey') +} + +function down (options) { + throw new Error('Not implemented.') +} + +export { + up, + down +}