38 lines
955 B
JavaScript
38 lines
955 B
JavaScript
|
module.exports = {
|
||
|
up: (queryInterface, Sequelize) => {
|
||
|
return queryInterface.createTable('licenses', {
|
||
|
id: {
|
||
|
allowNull: false,
|
||
|
autoIncrement: true,
|
||
|
primaryKey: true,
|
||
|
type: Sequelize.INTEGER
|
||
|
},
|
||
|
name: {
|
||
|
type: Sequelize.DataTypes.STRING,
|
||
|
allowNull: false,
|
||
|
},
|
||
|
key: {
|
||
|
type: Sequelize.DataTypes.STRING,
|
||
|
allowNull: false,
|
||
|
},
|
||
|
manufacturer: Sequelize.DataTypes.STRING,
|
||
|
seatsUsed: {
|
||
|
type: Sequelize.DataTypes.NUMBER,
|
||
|
defaultValue: 0,
|
||
|
},
|
||
|
seatsTotal: {
|
||
|
type: Sequelize.DataTypes.NUMBER,
|
||
|
defaultValue: 1,
|
||
|
},
|
||
|
purchasedFrom: Sequelize.DataTypes.STRING,
|
||
|
purchasedAt: Sequelize.DataTypes.DATE,
|
||
|
createdAt: Sequelize.DataTypes.DATE,
|
||
|
updatedAt: Sequelize.DataTypes.DATE,
|
||
|
});
|
||
|
},
|
||
|
|
||
|
down: (queryInterface, Sequelize) => {
|
||
|
return queryInterface.dropTable('licenses');
|
||
|
}
|
||
|
};
|