🗃️ Fix stickers migration issue
This commit is contained in:
parent
7af44da03b
commit
7452b0754d
@ -8,8 +8,8 @@ import (
|
||||
var AutoMaintainRange = []any{
|
||||
&models.Account{},
|
||||
&models.Attachment{},
|
||||
&models.Sticker{},
|
||||
&models.StickerPack{},
|
||||
&models.Sticker{},
|
||||
}
|
||||
|
||||
func RunMigration(source *gorm.DB) error {
|
||||
|
@ -19,7 +19,7 @@ type StickerPack struct {
|
||||
Prefix string `json:"prefix"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
Stickers []Sticker `json:"stickers" gorm:"constraint:OnDelete:DELETE"`
|
||||
Stickers []Sticker `json:"stickers" gorm:"foreignKey:PackID;constraint:OnDelete:CASCADE"`
|
||||
AccountID uint `json:"account_id"`
|
||||
Account Account `json:"account"`
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ files_deletion = 4
|
||||
files_analyze = 4
|
||||
|
||||
[debug]
|
||||
database = false
|
||||
database = true
|
||||
print_routes = false
|
||||
|
||||
[dealer]
|
||||
|
Loading…
Reference in New Issue
Block a user