Major changes to the database structure: Delete and recreate the whole database (would require too many migrations otherwise). Removed a market, updated some images, added to the AP page, and merged bios.

This commit is contained in:
Wynne Crisman
2016-06-26 11:16:00 -07:00
parent abee7df2eb
commit a57900c065
16 changed files with 163 additions and 247 deletions

View File

@@ -12,11 +12,25 @@ module.exports = {
autoIncrement: true
},
date: {
type: DataTypes.DATE,
type: DataTypes.DATEONLY,
allowNull: false
},
quantity: {
type: DataTypes.DECIMAL(13,2),
allowNull: false
},
price: {
type: DataTypes.DECIMAL(13,4),
allowNull: false
},
measure: {
type: DataTypes.JSONB,
type: Sequelize.INTEGER,
references: {
model: 'Measure',
key: 'id'
},
onUpdate: 'cascade',
onDelete: 'cascade',
allowNull: false
},
itemId: {
@@ -36,6 +50,14 @@ module.exports = {
},
onUpdate: 'cascade',
onDelete: 'cascade'
},
createdAt: {
type: DataTypes.DATE,
allowNull: false
},
updatedAt: {
type: DataTypes.DATE,
allowNull: false
}
}, {
charset: 'utf8'