PhilanthropyDataCommons / service

A project for collecting and serving public information associated with grant applications
GNU Affero General Public License v3.0
8 stars 2 forks source link

Update data type URL enum value to be `url` #989

Closed slifty closed 1 month ago

slifty commented 4 months ago

@slifty Ah, I'm glad you asked! Yes, I would expect the value to be lowercase. At least, alongside the other enum values:

export enum BaseFieldDataType {
    STRING = 'string',
    NUMBER = 'number',
    PHONE_NUMBER = 'phone_number',
    EMAIL = 'email',
    URL = 'URL',
    BOOLEAN = 'boolean',
}

Originally posted by @reefdog in https://github.com/PhilanthropyDataCommons/service/issues/975#issuecomment-2091930999

Our enum values are all snake_case except for URL which has capitalization. We should be consistent. Yes this does mean creating a migration unfortunately, but that's OK!