Fix SQL syntax error in ALTER TABLE DEFAULT value
This commit is contained in:
parent
48f18854cc
commit
613b962a87
@ -226,7 +226,7 @@ func (b *Backend) initializeSchema() error {
|
||||
|
||||
// Migration: Add storage limit fields to users table
|
||||
defaultStorageLimit, _ := b.config.GetDefaultUserStorageLimitBytes()
|
||||
_, err = b.db.Exec(`ALTER TABLE users ADD COLUMN storage_limit INTEGER DEFAULT ?`, defaultStorageLimit)
|
||||
_, err = b.db.Exec(fmt.Sprintf(`ALTER TABLE users ADD COLUMN storage_limit INTEGER DEFAULT %d`, defaultStorageLimit))
|
||||
if err != nil && !isColumnExistsError(err) {
|
||||
return fmt.Errorf("failed to add storage_limit column: %w", err)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user