mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-10 03:11:34 +00:00
added star rating to comments
This commit is contained in:
parent
396ecfff4a
commit
5fe3fd7f76
5 changed files with 210 additions and 72 deletions
18
server/migrations/v2.20.2-add-comment-ratings.js
Normal file
18
server/migrations/v2.20.2-add-comment-ratings.js
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
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')
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue