2019-06-06 23:54:32 +02:00
|
|
|
'use strict';
|
|
|
|
module.exports = {
|
|
|
|
up: (queryInterface, Sequelize) => {
|
|
|
|
return queryInterface.createTable('comments', {
|
|
|
|
id: {
|
|
|
|
allowNull: false,
|
|
|
|
autoIncrement: true,
|
|
|
|
primaryKey: true,
|
|
|
|
type: Sequelize.INTEGER
|
|
|
|
},
|
|
|
|
eventId: {
|
|
|
|
type: Sequelize.INTEGER,
|
|
|
|
references: {
|
2019-06-07 17:02:33 +02:00
|
|
|
model: 'events',
|
2019-06-06 23:54:32 +02:00
|
|
|
key: 'id'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
activitypub_id: {
|
|
|
|
type: Sequelize.BIGINT,
|
|
|
|
index: true,
|
|
|
|
},
|
|
|
|
data: {
|
|
|
|
type: Sequelize.JSON
|
|
|
|
},
|
|
|
|
createdAt: {
|
|
|
|
allowNull: false,
|
|
|
|
type: Sequelize.DATE
|
|
|
|
},
|
|
|
|
updatedAt: {
|
|
|
|
allowNull: false,
|
|
|
|
type: Sequelize.DATE
|
|
|
|
}
|
|
|
|
});
|
|
|
|
},
|
|
|
|
down: (queryInterface, Sequelize) => {
|
|
|
|
return queryInterface.dropTable('comments');
|
|
|
|
}
|
|
|
|
};
|