mirror of
https://framagit.org/les/gancio.git
synced 2025-01-31 16:42:22 +01:00
38 lines
No EOL
808 B
JavaScript
38 lines
No EOL
808 B
JavaScript
'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: {
|
|
model: 'events',
|
|
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');
|
|
}
|
|
}; |