28 lines
604 B
JavaScript
28 lines
604 B
JavaScript
module.exports = {
|
|
up: (queryInterface, Sequelize) => {
|
|
return queryInterface.createTable("Brands", {
|
|
id: {
|
|
allowNull: false,
|
|
autoIncrement: true,
|
|
primaryKey: true,
|
|
type: Sequelize.INTEGER
|
|
},
|
|
name: {
|
|
type: Sequelize.STRING,
|
|
allowNull: false,
|
|
unique: true
|
|
},
|
|
createdAt: {
|
|
allowNull: false,
|
|
type: Sequelize.DATE
|
|
},
|
|
updatedAt: {
|
|
allowNull: false,
|
|
type: Sequelize.DATE
|
|
}
|
|
});
|
|
},
|
|
down: queryInterface => {
|
|
return queryInterface.dropTable("Brands");
|
|
}
|
|
};
|