mirror of
https://framagit.org/les/gancio.git
synced 2025-01-31 16:42:22 +01:00
32 lines
672 B
JavaScript
32 lines
672 B
JavaScript
'use strict'
|
|
module.exports = {
|
|
up: (queryInterface, Sequelize) => {
|
|
return queryInterface.createTable('event_tags', {
|
|
eventId: {
|
|
type: Sequelize.INTEGER,
|
|
references: {
|
|
model: 'events',
|
|
key: 'id'
|
|
}
|
|
},
|
|
tagTag: {
|
|
type: Sequelize.STRING,
|
|
references: {
|
|
model: 'tags',
|
|
key: 'tag'
|
|
}
|
|
},
|
|
createdAt: {
|
|
allowNull: false,
|
|
type: Sequelize.DATE
|
|
},
|
|
updatedAt: {
|
|
allowNull: false,
|
|
type: Sequelize.DATE
|
|
}
|
|
})
|
|
},
|
|
down: (queryInterface, Sequelize) => {
|
|
return queryInterface.dropTable('event_tags')
|
|
}
|
|
}
|