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