mirror of
https://framagit.org/les/gancio.git
synced 2025-01-31 16:42:22 +01:00
35 lines
No EOL
665 B
JavaScript
35 lines
No EOL
665 B
JavaScript
'use strict';
|
|
|
|
|
|
module.exports = {
|
|
up (queryInterface, Sequelize) {
|
|
return queryInterface.createTable('filters', {
|
|
id: {
|
|
type: Sequelize.INTEGER,
|
|
primaryKey: true,
|
|
autoIncrement: true,
|
|
},
|
|
cohortId: {
|
|
type: Sequelize.INTEGER,
|
|
allowNull: true,
|
|
references: {
|
|
model: 'cohorts',
|
|
key: 'id'
|
|
},
|
|
onUpdate: 'CASCADE',
|
|
onDelete: 'SET NULL'
|
|
},
|
|
tags: {
|
|
type: Sequelize.JSON,
|
|
},
|
|
places: {
|
|
type: Sequelize.JSON,
|
|
}
|
|
})
|
|
},
|
|
|
|
down (queryInterface, _Sequelize) {
|
|
return queryInterface.dropTable('filters')
|
|
}
|
|
|
|
} |