Split ingress keys into text/image protocols with Replicate model listing.
CI / docker (push) Successful in 3m38s
CI / docker (push) Successful in 3m38s
Add model input defaults (including prompt), workflow model editing, ingress API docs, and fix img2img image upload filenames for signed URLs. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -49,9 +49,19 @@ func New(path string) (*Store, error) {
|
||||
); err != nil {
|
||||
return nil, fmt.Errorf("migrate: %w", err)
|
||||
}
|
||||
if err := ensureIngressKeyProtocol(db); err != nil {
|
||||
return nil, fmt.Errorf("migrate ingress protocol: %w", err)
|
||||
}
|
||||
return &Store{db: db}, nil
|
||||
}
|
||||
|
||||
func ensureIngressKeyProtocol(db *gorm.DB) error {
|
||||
if !tableExists(db, "ingress_keys") {
|
||||
return nil
|
||||
}
|
||||
return db.Exec(`UPDATE ingress_keys SET protocol = ? WHERE protocol IS NULL OR protocol = ''`, model.IngressProtocolText).Error
|
||||
}
|
||||
|
||||
// ensureIPRulesSchema manages ip_rules without GORM AutoMigrate (avoids bad table rebuilds).
|
||||
func ensureIPRulesSchema(db *gorm.DB) error {
|
||||
if !tableExists(db, "ip_rules") {
|
||||
|
||||
Reference in New Issue
Block a user