mirror of
https://framagit.org/les/gancio.git
synced 2025-01-31 16:42:22 +01:00
minor: refactoring AP migration
This commit is contained in:
parent
1adaa95817
commit
207b063534
2 changed files with 6 additions and 5 deletions
|
@ -7,7 +7,7 @@ module.exports = (sequelize, DataTypes) =>
|
|||
},
|
||||
follower: DataTypes.BOOLEAN,
|
||||
following: DataTypes.BOOLEAN,
|
||||
friendly: DataTypes.BOOLEAN,
|
||||
trusted: DataTypes.BOOLEAN,
|
||||
blocked: DataTypes.BOOLEAN,
|
||||
object: {
|
||||
type: DataTypes.JSON,
|
||||
|
|
|
@ -11,8 +11,9 @@ module.exports = {
|
|||
*/
|
||||
return Promise.all(
|
||||
[
|
||||
await queryInterface.addColumn('ap_users', 'trusted', { type: Sequelize.BOOLEAN }),
|
||||
await queryInterface.addColumn('instances', 'applicationActor', { type: Sequelize.STRING }),
|
||||
await queryInterface.addColumn('ap_users', 'following', { type: Sequelize.BOOLEAN }),
|
||||
await queryInterface.addColumn('ap_users', 'friendly', { type: Sequelize.BOOLEAN }),
|
||||
await queryInterface.addColumn('filters', 'actors', { type: Sequelize.JSON }),
|
||||
await queryInterface.addColumn('events', 'ap_id', { type: Sequelize.STRING, index: true }),
|
||||
await queryInterface.addColumn('events', 'apUserApId', {
|
||||
|
@ -24,17 +25,17 @@ module.exports = {
|
|||
onUpdate: 'CASCADE',
|
||||
onDelete: 'CASCADE'
|
||||
}),
|
||||
apUserApId
|
||||
])
|
||||
},
|
||||
|
||||
async down (queryInterface, Sequelize) {
|
||||
return Promise.all(
|
||||
[
|
||||
await queryInterface.removeColumn('instances', 'applicationActor'),
|
||||
await queryInterface.removeColumn('events', 'apUserApId'),
|
||||
await queryInterface.removeColumn('events', 'ap_id'),
|
||||
await queryInterface.removeColumn('ap_users', 'following'),
|
||||
await queryInterface.removeColumn('ap_users', 'friendly'),
|
||||
await queryInterface.removeColumn('ap_users', 'trusted'),
|
||||
])
|
||||
}
|
||||
};
|
Loading…
Reference in a new issue