| 312 | // which is exactly the operator surface for fixing orgs whose stored name |
| 313 | // is not a routable DNS label. The unique index still guards collisions; |
| 314 | // validation lives in the handler. |
| 315 | if updates.DatabaseName != "" { |
| 316 | fields["database_name"] = updates.DatabaseName |
| 317 | } |
| 318 | // HostnameAlias is *string: nil = preserve, "" = clear (NULL), "x" = set. |
| 319 | // NULL releases the unique-index slot so other orgs can take that alias. |
| 320 | if updates.HostnameAlias != nil { |
| 321 | if *updates.HostnameAlias == "" { |
| 322 | fields["hostname_alias"] = nil |
| 323 | } else { |