29 lines
801 B
JavaScript
29 lines
801 B
JavaScript
|
module.exports = {
|
||
|
up: (queryInterface, Sequelize) => {
|
||
|
return queryInterface.createTable('items', {
|
||
|
id: {
|
||
|
allowNull: false,
|
||
|
autoIncrement: true,
|
||
|
primaryKey: true,
|
||
|
type: Sequelize.INTEGER
|
||
|
},
|
||
|
name: {
|
||
|
type: Sequelize.DataTypes.STRING,
|
||
|
allowNull: false,
|
||
|
},
|
||
|
manufacturer: Sequelize.DataTypes.STRING,
|
||
|
serialNumber: Sequelize.DataTypes.STRING,
|
||
|
skuNumber: Sequelize.DataTypes.STRING,
|
||
|
type: Sequelize.DataTypes.STRING,
|
||
|
purchasedFrom: Sequelize.DataTypes.STRING,
|
||
|
purchasedAt: Sequelize.DataTypes.DATE,
|
||
|
createdAt: Sequelize.DataTypes.DATE,
|
||
|
updatedAt: Sequelize.DataTypes.DATE,
|
||
|
});
|
||
|
},
|
||
|
|
||
|
down: (queryInterface, Sequelize) => {
|
||
|
return queryInterface.dropTable('items');
|
||
|
}
|
||
|
};
|