mirror of
https://framagit.org/les/gancio.git
synced 2025-01-31 16:42:22 +01:00
34 lines
733 B
JavaScript
34 lines
733 B
JavaScript
'use strict'
|
|
|
|
module.exports = {
|
|
up: (queryInterface, Sequelize) => {
|
|
return queryInterface.createTable('places',
|
|
{
|
|
id: {
|
|
allowNull: false,
|
|
autoIncrement: true,
|
|
primaryKey: true,
|
|
type: Sequelize.INTEGER
|
|
},
|
|
name: {
|
|
type: Sequelize.STRING,
|
|
unique: true,
|
|
index: true,
|
|
allowNull: false
|
|
},
|
|
address: Sequelize.STRING,
|
|
createdAt: {
|
|
allowNull: false,
|
|
type: Sequelize.DATE
|
|
},
|
|
updatedAt: {
|
|
allowNull: false,
|
|
type: Sequelize.DATE
|
|
}
|
|
})
|
|
},
|
|
|
|
down: (queryInterface, Sequelize) => {
|
|
return queryInterface.dropTable('places')
|
|
}
|
|
}
|