Null equivalence - Empty string default value cleaning#16217
Conversation
etiennejouan
commented
Dec 1, 2025
- on name standard field on custom object (field metadata + db)
- on text standard fields on standard object (db only)
Greptile OverviewGreptile SummaryThis PR removes empty string default values for text fields and replaces them with
This change is consistent with the broader null equivalence initiative where empty strings ( Confidence Score: 5/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant Client as Client/API Request
participant Factory as WorkspaceMigrationFactory
participant Builder as buildDefaultFlatFieldMetadatas
participant DB as Database
participant Transformer as transformTextField
Note over Client,Transformer: Null Equivalence Flow
alt Creating Custom Object
Client->>Builder: Create custom object
Builder->>Builder: Set name field with isNullable: true, defaultValue: null
Builder->>DB: Store field metadata
end
alt Creating TEXT Field Migration
Client->>Factory: Create TEXT field
Factory->>Factory: Use basicColumnActionFactory (no default value options)
Factory->>DB: Create column without default value
end
alt Inserting/Updating Records
Client->>Transformer: Send text field value ('' or null)
Transformer->>Transformer: isNullEquivalentTextFieldValue() checks
alt Empty string with feature flag enabled
Transformer->>Transformer: Convert '' to null
end
Transformer->>DB: Store as NULL in database
end
|
|
🚀 Preview Environment Ready! Your preview environment is available at: http://bore.pub:19929 This environment will automatically shut down when the PR is closed or after 5 hours. |
| applicationId: applicationId ?? null, | ||
| }; | ||
|
|
||
| const nameFieldId = v4(); |
|
Hey @etiennejouan! After you've done the QA of your Pull Request, you can mark it as done here. Thank you! |
- on name standard field on custom object (field metadata + db) - on text standard fields on standard object (db only)
Because of [this code I forget to clean](#16217), - __workspace created between 1.12.0 and 1.12.2 (from friday 28 nov PM > monday 1 dec PM)__ have standard objects with empty string default value set on related TEXT type column (but default value null on field metadata) (ex: jobTitle on person) - __custom objects created between 1.12.0 and 1.12.2 (from friday 28 nov PM > monday 1 dec PM)__ have "name" TEXT field with empty string default value set + NOT NULL constraint on column Command cleans data and updates table structure