mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-09 19:01:41 +00:00
18 lines
No EOL
404 B
JavaScript
18 lines
No EOL
404 B
JavaScript
const { DataTypes } = require('sequelize')
|
|
|
|
module.exports = {
|
|
up: async (queryInterface, Sequelize) => {
|
|
await queryInterface.addColumn('comments', 'rating', {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: true,
|
|
validate: {
|
|
min: 1,
|
|
max: 5
|
|
}
|
|
})
|
|
},
|
|
|
|
down: async (queryInterface, Sequelize) => {
|
|
await queryInterface.removeColumn('comments', 'rating')
|
|
}
|
|
}
|