fix(backend): harden final MVP invariants

This commit is contained in:
2026-07-22 01:24:41 +08:00
parent c527cd6ed0
commit 26c3e6fd8a
26 changed files with 684 additions and 179 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)
}