🐛 Fix migration issue on pools
This commit is contained in:
parent
98cf753f66
commit
a65b761d5e
@ -6,8 +6,8 @@
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="18dd0d68-b4b8-40db-9734-9119b5c848bd" name="更改" comment=":recycle: Split mark and delete file">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/pkg/internal/services/recycler.go" beforeDir="false" afterPath="$PROJECT_DIR$/pkg/internal/services/recycler.go" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/pkg/main.go" beforeDir="false" afterPath="$PROJECT_DIR$/pkg/main.go" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/pkg/internal/database/migrator.go" beforeDir="false" afterPath="$PROJECT_DIR$/pkg/internal/database/migrator.go" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/pkg/internal/models/pools.go" beforeDir="false" afterPath="$PROJECT_DIR$/pkg/internal/models/pools.go" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
@ -7,8 +7,8 @@ import (
|
||||
|
||||
var AutoMaintainRange = []any{
|
||||
&models.Account{},
|
||||
&models.Attachment{},
|
||||
&models.AttachmentPool{},
|
||||
&models.Attachment{},
|
||||
&models.StickerPack{},
|
||||
&models.Sticker{},
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ type AttachmentPool struct {
|
||||
Description string `json:"description"`
|
||||
Config datatypes.JSONType[AttachmentPoolConfig] `json:"config"`
|
||||
|
||||
Attachments []Attachment `json:"attachments"`
|
||||
Attachments []Attachment `json:"attachments" gorm:"foreignKey:PoolID"`
|
||||
|
||||
Account *Account `json:"account"`
|
||||
AccountID *uint `json:"account_id"`
|
||||
|
Loading…
Reference in New Issue
Block a user