mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-03-01 05:29:41 +00:00
Complete migration file
This commit is contained in:
parent
b8de041497
commit
243bc7b0d0
22 changed files with 1203 additions and 162 deletions
|
|
@ -10,7 +10,7 @@ module.exports = (sequelize) => {
|
|||
primaryKey: true
|
||||
},
|
||||
eventName: DataTypes.STRING,
|
||||
urls: DataTypes.TEXT, // JSON array of urls
|
||||
urls: DataTypes.JSON, // JSON array of urls
|
||||
titleTemplate: DataTypes.STRING(1000),
|
||||
bodyTemplate: DataTypes.TEXT,
|
||||
type: DataTypes.STRING,
|
||||
|
|
@ -18,16 +18,12 @@ module.exports = (sequelize) => {
|
|||
lastAttemptFailed: DataTypes.BOOLEAN,
|
||||
numConsecutiveFailedAttempts: DataTypes.INTEGER,
|
||||
numTimesFired: DataTypes.INTEGER,
|
||||
enabled: DataTypes.BOOLEAN
|
||||
enabled: DataTypes.BOOLEAN,
|
||||
extraData: DataTypes.JSON
|
||||
}, {
|
||||
sequelize,
|
||||
modelName: 'Notification'
|
||||
})
|
||||
|
||||
const { Library } = sequelize.models
|
||||
|
||||
Library.hasMany(Notification)
|
||||
Notification.belongsTo(Library)
|
||||
|
||||
return Notification
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue