mirror of
https://framagit.org/les/gancio.git
synced 2025-02-01 09:02:01 +01:00
31 lines
595 B
JavaScript
31 lines
595 B
JavaScript
|
'use strict';
|
||
|
|
||
|
module.exports = {
|
||
|
up (queryInterface, Sequelize) {
|
||
|
return queryInterface.createTable('cohorts', {
|
||
|
id: {
|
||
|
type: Sequelize.INTEGER,
|
||
|
primaryKey: true,
|
||
|
allowNull: false,
|
||
|
autoIncrement: true,
|
||
|
},
|
||
|
name: {
|
||
|
type: Sequelize.STRING,
|
||
|
unique: true,
|
||
|
index: true,
|
||
|
allowNull: false
|
||
|
},
|
||
|
isActor: {
|
||
|
type: Sequelize.BOOLEAN
|
||
|
},
|
||
|
isTop: {
|
||
|
type: Sequelize.BOOLEAN
|
||
|
}
|
||
|
})
|
||
|
},
|
||
|
|
||
|
down (queryInterface, Sequelize) {
|
||
|
return queryInterface.dropTable('cohorts')
|
||
|
}
|
||
|
};
|