fix(backend): harden final MVP invariants

This commit is contained in:
2026-07-22 01:24:41 +08:00
parent 251b212e06
commit 78d4845688
26 changed files with 977 additions and 175 deletions

View File

@@ -23,7 +23,8 @@ func New(dsn string) error {
}
func AutoMigrate(database *gorm.DB) error {
return database.AutoMigrate(
if err := database.AutoMigrate(
&SenlinAgentSchemaMigration{},
&SenlinAgentUser{},
&SenlinAgentProject{},
&SenlinAgentInboxItem{},
@@ -40,5 +41,8 @@ func AutoMigrate(database *gorm.DB) error {
&SenlinAgentAICallLog{},
&SenlinAgentAIRateBucket{},
&SenlinAgentTaskShare{},
)
); err != nil {
return err
}
return runVersionedMigrations(database)
}