Add: series migration to be unique

This commit is contained in:
Nicholas Wallace 2024-09-13 16:55:48 -07:00
parent 01fbea02f1
commit 2711b989e1
3 changed files with 358 additions and 0 deletions

View file

@ -83,6 +83,12 @@ class Series extends Model {
// collate: 'NOCASE'
// }]
// },
{
// unique constraint on name and libraryId
fields: ['name', 'libraryId'],
unique: true,
name: 'unique_series_name_per_library'
},
{
fields: ['libraryId']
}