mirror of
https://framagit.org/les/gancio.git
synced 2025-02-01 09:02:01 +01:00
32 lines
675 B
JavaScript
32 lines
675 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');
|
||
|
}
|
||
|
};
|