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:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user