Skip to content

Standardize Database Table and Field Naming Conventions With Their Backend Application Mappings

Problem Description

Please Note: Several tasks to prune unused tables and columns from the database are already under way. SMS/Notification features will be scrubbed in those issues.

The current database schema suffers from inconsistent naming conventions that create maintenance challenges and reduce code clarity.

"The following comes from experience in the project and is not a simple suggestion from ai. Cleaning this up would significantly reduce long-term technical debt. I struggled very much the first 6-9 months trying to roughly map all this in my mind." @ThomasAFink

Hier schreiben.

Hier schreiben.

Hier schreiben.

Investment: Standardize schema and update queries
Return:
- Faster developer onboarding (saves months per new dev)
- Reduced debugging time (saves hours per issue)
- Improved development velocity (saves time on every backend feature)
- Reduced bug introduction (prevents costly production issues and hotfixes)
- Faster refactoring of other parts later
- Easier test writing


The issues include:

1. Mixed Language Usage (German ↔ English)

  • Table names: oeffnungszeit (German) vs availability (English concept)
  • Table names: standort (German) vs scope (English concept)
  • Table names: buerger (German) vs citizen (English concept)
  • Table names: feiertage (German) vs holidays (English concept)

2. Inconsistent Naming Conventions

  • Mix of camelCase and snake_case: StandortID vs scope_id
  • Mixed conventions within same table: contact__name vs contact__email vs StandortID

3. Conceptual Inconsistencies

  • Same concept with different names: availability/oeffnungszeit, scope/standort
  • Query classes use English names but map to German table names

Current Examples

Availability Query Class:

php
const TABLE = 'oeffnungszeit';  // German table name
// But maps to English field names:
'id' => 'availability.OeffnungszeitID',
'scope__id' => 'availability.StandortID',

Scope Query Class:

php
const TABLE = 'standort';  // German table name
// Maps to mixed naming:
'id' => 'scope.StandortID',
'contact__name' => 'scopeprovider.name',

Proposed Solution

Standardization Rules:

  1. Language: Convert all table and column names to English
  2. Database Convention: Use snake_case for all table and column names
  3. Mapping Convention: Use camelCase for all mapping variables in Query classes
  4. Consistency: Align concept naming across the entire schema

Migration Plan:

  1. Phase 1: Table Renaming

    • oeffnungszeitavailability
    • standortscope
    • buergercitizen
    • feiertageholidays
    • gesamtkalendercalendar
  2. Phase 2: Column Standardization

    • Convert all column names to snake_case
    • Standardize foreign key naming: StandortIDscope_id
    • Align field naming: OeffnungszeitIDavailability_id
  3. Phase 3: Query Class Updates

    • Update all Zmsdb/Query/* classes to use new table/column names
    • Ensure variable mapping uses camelCase: scopeIdavailability.scope_id
    • Update entity mapping methods

Expected Outcomes

  • Maintainability: Consistent naming reduces cognitive load
  • Clarity: English names improve international collaboration
  • Alignment: Query classes match actual database schema
  • Future-proofing: Standardized conventions for new development
  • Testability: Easier to write and maintain tests with consistent naming

Implementation Notes

  • Create comprehensive migration scripts for each table
  • Update all affected query classes in zmsdb/src/Zmsdb/Query/
  • Ensure backward compatibility during transition period
  • Update documentation and API references

Example After Standardization

Availability Query Class (After):

php
const TABLE = 'availability';  // English snake_case table name
// Maps to camelCase variables:
'id' => 'availability.availability_id',
'scopeId' => 'availability.scope_id',
'startDate' => 'availability.start_date',

Scope Query Class (After):

php
const TABLE = 'scope';  // English snake_case table name
// Maps to camelCase variables:
'id' => 'scope.scope_id',
'contactName' => 'scopeprovider.name',

This approach ensures:

  • Database: All snake_case (standard SQL convention)
  • Query Mappings: All camelCase (standard PHP convention)
  • Consistency: No exceptions, everything follows the same pattern

Three phases:

  1. Complete Table Renaming Plan - All English, All snake_case easy
  • 47 tables converted from German to English
  • All table names standardized to snake_case
  • Organized by business priority (Core → User → System → Technical)
  • Clear migration path with examples
  1. Complete Column Renaming Plan - All English, All snake_case easy-medium
  • Hundreds of columns converted from German to English
  • All column names standardized to snake_case
  • Foreign key naming standardized across all tables
  • Common patterns identified and standardized
  1. Complete PHP Variable Mapping Renaming Plan - All English, All camelCase hard
  • All Query class mappings converted to camelCase
  • Double underscore patterns eliminated
  • Nested object patterns standardized
  • Reference mappings updated

All tables columns and mappings may not be listed here. This list may be incomplete. It is however a good start. A good overview can be found in the local ddev developer environment.

1. Complete Table Renaming Plan - All English, All snake_case

Phase 1: Core Business Tables (High Priority)

CurrentNew (snake_case)Reason
oeffnungszeitavailabilityOpening hours/availability
standortscopeLocation/scope
buergercitizenCitizen
feiertageholidaysHolidays
gesamtkalendercalendarCalendar
behoerdedepartmentGovernment department
organisationorganizationOrganization

Phase 2: User & Process Tables

CurrentNew (snake_case)Reason
buergeranliegencitizen_requestsCitizen requests/issues
buergerarchivcitizen_archiveArchived citizen data
nutzeruserSystem users
nutzerzuordnunguser_assignmentUser assignments
kundecustomerCustomer
kundenlinkscustomer_linksCustomer links

Phase 3: System & Configuration Tables

CurrentNew (snake_case)Reason
abrechnungbillingBilling/accounting
ipausnahmenip_exceptionsIP exceptions
kioskkioskKiosk (universal term)
wartenrstatistikqueue_number_statisticsQueue number statistics
standortclusterlocation_clusterLocation clustering
statistikstatisticsStatistics

Phase 4: API & Technical Tables

CurrentNew (snake_case)Reason
apiclientapi_clientAPI client
apikeyapi_keyAPI key
apiquotaapi_quotaAPI quota

Phase 5: Communication Tables

CurrentNew (snake_case)Reason
emailemailEmail (already snake_case)
smssmsSMS (already snake_case)
mailpartmail_partMail part
mailqueuemail_queueMail queue
mailtemplatemail_templateMail template
notificationqueuenotification_queueNotification queue

Phase 6: Data & Process Tables

CurrentNew (snake_case)Reason
closuresclosuresAlready snake_case
configconfigAlready snake_case
eventlogevent_logEvent log
imagedataimage_dataImage data
loglogAlready snake_case
migrationsmigrationsAlready snake_case
preferencespreferencesAlready snake_case
process_sequenceprocess_sequenceAlready snake_case
sessiondatasession_dataSession data
sourcesourceAlready snake_case

Phase 7: Service & Provider Tables

CurrentNew (snake_case)Reason
providerproviderAlready snake_case
requestrequestAlready snake_case
request_providerrequest_providerAlready snake_case
request_variantrequest_variantAlready snake_case

Phase 8: Slot System Tables

CurrentNew (snake_case)Reason
slotslotAlready snake_case
slot_hieraslot_hierarchySlot hierarchy
slot_processslot_processAlready snake_case
slot_sequenceslot_sequenceAlready snake_case

Phase 9: Assignment & Clustering Tables

CurrentNew (snake_case)Reason
clusterzuordnungcluster_assignmentCluster assignment

2. Complete Column Renaming Plan - All English, All snake_case

Phase 1: Core Business Tables (High Priority)

availability (formerly oeffnungszeit)

Current ColumnNew Column (snake_case)Reason
OeffnungszeitIDavailability_idPrimary key
StandortIDscope_idForeign key to scope
BehoerdenIDdepartment_idForeign key to department
Startdatumstart_dateStart date
Endedatumend_dateEnd date
Anfangszeitstart_timeStart time
Endzeitend_timeEnd time
Terminanfangszeitappointment_start_timeAppointment start time
Terminendzeitappointment_end_timeAppointment end time
WochentagweekdayWeekday
Timeslottime_slotTime slot
kommentarcommentComment
Offen_abopen_from_daysOpen from days
Offen_bisopen_until_daysOpen until days
Anzahlterminarbeitsplaetzeappointment_workstation_countAppointment workstation count
reduktionTermineImInternetinternet_reductionInternet reduction
reduktionTermineCallcentercallcenter_reductionCall center reduction
erlaubemehrfachslotsmultiple_slots_allowedMultiple slots allowed
allexWochenevery_x_weeksEvery X weeks
jedexteWocheevery_other_weekEvery other week
updateTimestampupdated_atUpdate timestamp

scope (formerly standort)

Current ColumnNew Column (snake_case)Reason
StandortIDscope_idPrimary key
BehoerdenIDdepartment_idForeign key to department
BezeichnungnameName/designation
standortkuerzelshort_nameShort name
AdresseaddressAddress
emailstandortadminadmin_emailAdmin email
InfoDienstleisterIDinfo_provider_idInfo provider ID
sourcesourceSource (already snake_case)
Termine_abappointments_from_daysAppointments from days
Termine_bisappointments_until_daysAppointments until days
loeschdauerdeletion_durationDeletion duration
reservierungsdauerreservation_durationReservation duration
aktivierungsdaueractivation_durationActivation duration
mehrfachterminemultiple_appointmentsMultiple appointments
wartenummernkontingentqueue_number_contingentQueue number contingent
vergebenewartenummernassigned_queue_numbersAssigned queue numbers
letztewartenrlast_queue_numberLast queue number
startwartenrfirst_queue_numberFirst queue number
endwartenrlast_queue_numberLast queue number
anzahlwiederaufrufrecall_countRecall count
aufrufanzeigetextdisplay_textDisplay text
wartenrhinweisqueue_hintQueue hint
standortinfozeilelocation_info_lineLocation info line
ausgabeschalternamepickup_counter_namePickup counter name
defaultabholerstandortdefault_pickup_locationDefault pickup location
wartezeitveroeffentlichenpublish_waiting_timePublish waiting time
ohnestatistikwithout_statisticsWithout statistics
notruffunktionemergency_functionEmergency function
notrufausgeloestemergency_triggeredEmergency triggered
notrufantwortemergency_responseEmergency response
notrufinitiierungemergency_initiationEmergency initiation
virtuellesachbearbeiterzahlvirtual_processor_countVirtual processor count
wartenrdatumqueue_number_dateQueue number date
Bearbeitungszeitprocessing_timeProcessing time
emailPflichtfeldemail_requiredEmail required
telefonPflichtfeldphone_requiredPhone required
telefonaktiviertphone_enabledPhone enabled
anmerkungPflichtfeldcomment_requiredComment required
anmerkungLabelcomment_labelComment label
qtv_urlqtv_urlQTV URL (already snake_case)
email_confirmation_activatedemail_confirmation_activatedAlready snake_case
appointments_per_mailappointments_per_mailAlready snake_case
slots_per_appointmentslots_per_appointmentAlready snake_case
whitelisted_mailswhitelisted_mailsAlready snake_case
custom_text_field_activecustom_text_field_activeAlready snake_case
custom_text_field_requiredcustom_text_field_requiredAlready snake_case
custom_text_field_labelcustom_text_field_labelAlready snake_case
custom_text_field2_activecustom_text_field2_activeAlready snake_case
custom_text_field2_requiredcustom_text_field2_requiredAlready snake_case
custom_text_field2_labelcustom_text_field2_labelAlready snake_case
captcha_activated_requiredcaptcha_activated_requiredAlready snake_case
admin_mail_on_appointmentadmin_mail_on_appointmentAlready snake_case
admin_mail_on_deletedadmin_mail_on_deletedAlready snake_case
admin_mail_on_updatedadmin_mail_on_updatedAlready snake_case
admin_mail_on_mail_sentadmin_mail_on_mail_sentAlready snake_case
smsbestaetigungstextsms_confirmation_textSMS confirmation text
smsbenachrichtigungstextsms_notification_textSMS notification text
smsbenachrichtigungsfristsms_notification_deadlineSMS notification deadline
smswmsbestaetigungsms_wms_confirmationSMS WMS confirmation
smswarteschlangesms_queueSMS queue
smskioskangebotsfristsms_kiosk_offer_deadlineSMS kiosk offer deadline
smsnachtragsms_additionSMS addition
kundenbef_emailtextcustomer_survey_email_textCustomer survey email text
kundenbefragungcustomer_surveyCustomer survey
kundenbef_labelcustomer_survey_labelCustomer survey label
info_for_appointmentinfo_for_appointmentAlready snake_case
info_for_all_appointmentsinfo_for_all_appointmentsAlready snake_case
updateTimestampupdated_atUpdate timestamp

citizen (formerly buerger)

Current ColumnNew Column (snake_case)Reason
BuergerIDcitizen_idPrimary key
StandortIDscope_idForeign key to scope
AbholortIDpickup_location_idPickup location ID
NutzerIDuser_idUser ID
NamenameName
EmailemailEmail
TelefonphonePhone
AnmerkungcommentComment
vorlaeufigeBuchungprovisional_bookingProvisional booking
bestaetigtconfirmedConfirmed
aufruferfolgreichcall_successfulCall successful
aufrufzeitcall_timeCall time
Abholerpickup_personPickup person
wartenrqueue_numberQueue number
wartenrdatumqueue_number_dateQueue number date
wartezeitwaiting_timeWaiting time
bearbeitungszeitprocessing_timeProcessing time
parkedparkedAlready snake_case
wasMissedwas_missedWas missed
apiClientIDapi_client_idAPI client ID
sourcesourceSource (already snake_case)
updateTimestampupdated_atUpdate timestamp

Phase 2: User & Process Tables (Medium Priority)

citizen_requests (formerly buergeranliegen)

Current ColumnNew Column (snake_case)Reason
BuergeranliegenIDcitizen_request_idPrimary key
BuergerIDcitizen_idForeign key to citizen
StandortIDscope_idForeign key to scope
AnliegenrequestRequest/concern
sourcesourceSource (already snake_case)
updateTimestampupdated_atUpdate timestamp

user (formerly nutzer)

Current ColumnNew Column (snake_case)Reason
NutzerIDuser_idPrimary key
BehoerdenIDdepartment_idForeign key to department
NamenameName
EmailemailEmail
PasswortpasswordPassword
updateTimestampupdated_atUpdate timestamp

Phase 3: System & Configuration Tables (Lower Priority)

api_client (formerly apiclient)

Current ColumnNew Column (snake_case)Reason
apiClientIDapi_client_idPrimary key
clientKeyclient_keyClient key
shortnameshort_nameShort name
accesslevelaccess_levelAccess level
updateTimestampupdated_atUpdate timestamp

api_key (formerly apikey)

Current ColumnNew Column (snake_case)Reason
apiKeyIDapi_key_idPrimary key
apiClientIDapi_client_idForeign key to api_client
keykeyKey (already snake_case)
updateTimestampupdated_atUpdate timestamp

Phase 4: Slot System Tables

slot

Current ColumnNew Column (snake_case)Reason
slotIDslot_idPrimary key
scopeIDscope_idForeign key to scope
availabilityIDavailability_idForeign key to availability
yearyearYear (already snake_case)
monthmonthMonth (already snake_case)
daydayDay (already snake_case)
timetimeTime (already snake_case)
publicpublicPublic (already snake_case)
callcentercallcenterCall center (already snake_case)
interninternInternal (already snake_case)
statusstatusStatus (already snake_case)
slotTimeInMinutesslot_time_in_minutesSlot time in minutes
createTimestampcreated_atCreate timestamp
updateTimestampupdated_atUpdate timestamp

Phase 4: Foreign Key Standardization

Current PatternNew PatternExample
StandortIDscope_idForeign key to scope table
BehoerdenIDdepartment_idForeign key to department table
BuergerIDcitizen_idForeign key to citizen table
NutzerIDuser_idForeign key to user table
OeffnungszeitIDavailability_idForeign key to availability table

3. Complete PHP Variable Mapping Renaming Plan - All English, All camelCase

Step 1: Update Entity Mappings Replace all double underscore patterns with camelCase Update all German variable names to English Ensure consistent naming across all Query classes

Step 2: Update Method Names Update method names that reference old mappings Ensure parameter names match new mapping keys Update any hardcoded references

Step 3: Update Tests Update all test cases to use new mapping keys Ensure test data matches new naming conventions Update any mock data or fixtures

Step 4: Update Documentation Update API documentation with new field names Update any external references to old field names Create migration guide for API consumers This comprehensive plan ensures: Complete camelCase conversion for all PHP variable mappings Elimination of double underscores in favor of camelCase Consistent English naming throughout the codebase Maintainable structure with clear patterns

Phase 1: Core Entity Mappings (High Priority)

Availability Query Class

Current MappingNew Mapping (camelCase)Database Column (snake_case)
'id''id'availability.availability_id
'scope**id''scopeId'availability.scope_id
'bookable**startInDays''bookableStartInDays'availability.open_from_days
'bookable**endInDays''bookableEndInDays'availability.open_until_days
'description''description'availability.comment
'startDate''startDate'availability.start_date
'startTime''startTime'availability.start_time
'endDate''endDate'availability.end_date
'endTime''endTime'availability.end_time
'lastChange''lastChange'availability.updated_at
'multipleSlotsAllowed''multipleSlotsAllowed'availability.multiple_slots_allowed
'repeat**afterWeeks''repeatAfterWeeks'availability.every_x_weeks
'repeat**weekOfMonth''repeatWeekOfMonth'availability.every_other_week
'slotTimeInMinutes''slotTimeInMinutes'availability.time_slot
'type''type'availability.type
'weekday**monday''weekdayMonday'availability.weekday
'weekday**tuesday''weekdayTuesday'availability.weekday
'weekday**wednesday''weekdayWednesday'availability.weekday
'weekday**thursday''weekdayThursday'availability.weekday
'weekday**friday''weekdayFriday'availability.weekday
'weekday**saturday''weekdaySaturday'availability.weekday
'weekday**sunday''weekdaySunday'availability.weekday
'workstationCount**callcenter''workstationCountCallcenter'availability.workstation_count_callcenter
'workstationCount**intern''workstationCountIntern'availability.workstation_count_intern
'workstationCount__public''workstationCountPublic'availability.workstation_count_public

Scope Query Class

Current MappingNew Mapping (camelCase)Database Column (snake_case)
'hint''hint'scope.hint
'id''id'scope.scope_id
'contact**name''contactName'scopeprovider.name
'contact**street''contactStreet'scope.address
'contact**email''contactEmail'scope.admin_email
'contact**country''contactCountry'"Germany"
'lastChange''lastChange'scope.updated_at
'preferencesappointmentdeallocationDuration''preferencesAppointmentDeallocationDuration'scope.deletion_duration
'preferencesappointmentinfoForAppointment''preferencesAppointmentInfoForAppointment'scope.info_for_appointment
'preferencesappointmentinfoForAllAppointments''preferencesAppointmentInfoForAllAppointments'scope.info_for_all_appointments
'preferencesappointmentendInDaysDefault''preferencesAppointmentEndInDaysDefault'scope.appointments_until_days
'preferencesappointmentmultipleSlotsEnabled''preferencesAppointmentMultipleSlotsEnabled'scope.multiple_appointments
'preferencesappointmentreservationDuration''preferencesAppointmentReservationDuration'scope.reservation_duration
'preferencesappointmentactivationDuration''preferencesAppointmentActivationDuration'scope.activation_duration
'preferencesappointmentstartInDaysDefault''preferencesAppointmentStartInDaysDefault'scope.appointments_from_days
'preferencesappointmentnotificationConfirmationEnabled''preferencesAppointmentNotificationConfirmationEnabled'scope.sms_confirmation_enabled
'preferencesappointmentnotificationHeadsUpEnabled''preferencesAppointmentNotificationHeadsUpEnabled'scope.sms_notification_enabled
'preferencesclientalternateAppointmentUrl''preferencesClientAlternateAppointmentUrl'scope.qtv_url
'preferencesclientamendmentActivated''preferencesClientAmendmentActivated'scope.comment_required
'preferencesclientamendmentLabel''preferencesClientAmendmentLabel'scope.comment_label
'preferencesclientemailFrom''preferencesClientEmailFrom'scopemail.sender_address
'preferencesclientemailRequired''preferencesClientEmailRequired'scope.email_required
'preferencesclientemailConfirmationActivated''preferencesClientEmailConfirmationActivated'scope.email_confirmation_activated
'preferencesclienttelephoneActivated''preferencesClientTelephoneActivated'scope.phone_enabled
'preferencesclienttelephoneRequired''preferencesClientTelephoneRequired'scope.phone_required
'preferencesclientappointmentsPerMail''preferencesClientAppointmentsPerMail'scope.appointments_per_mail
'preferencesclientslotsPerAppointment''preferencesClientSlotsPerAppointment'scope.slots_per_appointment
'preferencesclientwhitelistedMails''preferencesClientWhitelistedMails'scope.whitelisted_mails
'preferencesclientcustomTextfieldActivated''preferencesClientCustomTextfieldActivated'scope.custom_text_field_active
'preferencesclientcustomTextfieldRequired''preferencesClientCustomTextfieldRequired'scope.custom_text_field_required
'preferencesclientcustomTextfieldLabel''preferencesClientCustomTextfieldLabel'scope.custom_text_field_label
'preferencesclientcustomTextfield2Activated''preferencesClientCustomTextfield2Activated'scope.custom_text_field2_active
'preferencesclientcustomTextfield2Required''preferencesClientCustomTextfield2Required'scope.custom_text_field2_required
'preferencesclientcustomTextfield2Label''preferencesClientCustomTextfield2Label'scope.custom_text_field2_label
'preferencesclientcaptchaActivatedRequired''preferencesClientCaptchaActivatedRequired'scope.captcha_activated_required
'preferencesclientadminMailOnAppointment''preferencesClientAdminMailOnAppointment'scope.admin_mail_on_appointment
'preferencesclientadminMailOnDeleted''preferencesClientAdminMailOnDeleted'scope.admin_mail_on_deleted
'preferencesclientadminMailOnUpdated''preferencesClientAdminMailOnUpdated'scope.admin_mail_on_updated
'preferencesclientadminMailOnMailSent''preferencesClientAdminMailOnMailSent'scope.admin_mail_on_mail_sent
'preferencesnotificationsconfirmationContent''preferencesNotificationsConfirmationContent'scope.sms_confirmation_text
'preferencesnotificationsheadsUpContent''preferencesNotificationsHeadsUpContent'scope.sms_notification_text
'preferencesnotificationsheadsUpTime''preferencesNotificationsHeadsUpTime'scope.sms_notification_deadline
'preferencespickupalternateName''preferencesPickupAlternateName'scope.pickup_counter_name
'preferencespickupisDefault''preferencesPickupIsDefault'scope.default_pickup_location
'preferencesqueuecallCountMax''preferencesQueueCallCountMax'scope.recall_count
'preferencesqueuecallDisplayText''preferencesQueueCallDisplayText'scope.display_text
'preferencesqueuefirstNumber''preferencesQueueFirstNumber'scope.first_queue_number
'preferencesqueuelastNumber''preferencesQueueLastNumber'scope.last_queue_number
'preferencesqueuemaxNumberContingent''preferencesQueueMaxNumberContingent'scope.queue_number_contingent
'preferencesqueueprocessingTimeAverage''preferencesQueueProcessingTimeAverage'scope.processing_time
'preferencesqueuepublishWaitingTimeEnabled''preferencesQueuePublishWaitingTimeEnabled'scope.publish_waiting_time
'preferencesqueuestatisticsEnabled''preferencesQueueStatisticsEnabled'scope.statistics_enabled
'preferencessurveyemailContent''preferencesSurveyEmailContent'scope.customer_survey_email_text
'preferencessurveyenabled''preferencesSurveyEnabled'scope.customer_survey
'preferencessurveylabel''preferencesSurveyLabel'scope.customer_survey_label
'preferencesticketprinterbuttonName''preferencesTicketprinterButtonName'scope.location_info_line
'preferencesticketprinterconfirmationEnabled''preferencesTicketprinterConfirmationEnabled'scope.sms_wms_confirmation
'preferencesticketprinterdeactivatedText''preferencesTicketprinterDeactivatedText'scope.queue_hint
'preferencesticketprinternotificationsAmendmentEnabled''preferencesTicketprinterNotificationsAmendmentEnabled'scope.sms_addition
'preferencesticketprinternotificationsEnabled''preferencesTicketprinterNotificationsEnabled'scope.sms_queue
'preferencesticketprinternotificationsDelay''preferencesTicketprinterNotificationsDelay'scope.sms_kiosk_offer_deadline
'preferencesworkstationemergencyEnabled''preferencesWorkstationEmergencyEnabled'scope.emergency_function
'preferencesworkstationemergencyRefreshInterval''preferencesWorkstationEmergencyRefreshInterval'scope.emergency_refresh_interval
'shortName''shortName'scope.short_name
'statusemergencyacceptedByWorkstation''statusEmergencyAcceptedByWorkstation'scope.emergency_response
'statusemergencyactivated''statusEmergencyActivated'scope.emergency_triggered
'statusemergencycalledByWorkstation''statusEmergencyCalledByWorkstation'scope.emergency_initiation
'statusqueueghostWorkstationCount''statusQueueGhostWorkstationCount'scope.virtual_processor_count
'statusqueuegivenNumberCount''statusQueueGivenNumberCount'scope.assigned_queue_numbers
'statusqueuelastGivenNumber''statusQueueLastGivenNumber'scope.last_queue_number
'statusqueuelastGivenNumberTimestamp''statusQueueLastGivenNumberTimestamp'scope.queue_number_date

Phase 2: Process & Citizen Mappings (Medium Priority)

Process Query Class

Current MappingNew Mapping (camelCase)Database Column (snake_case)
'amendment''amendment'process.comment
'id''id'process.citizen_id
'appointments0date''appointments0Date'process.appointment_datetime
'scope**id''scopeId'process.scope_id
'appointments0scope**id''appointments0ScopeId'process.scope_id

Citizen Query Class

Current MappingNew Mapping (camelCase)Database Column (snake_case)
'id''id'citizen.citizen_id
'scopeId''scopeId'citizen.scope_id
'pickupLocationId''pickupLocationId'citizen.pickup_location_id
'userId''userId'citizen.user_id
'name''name'citizen.name
'email''email'citizen.email
'phone''phone'citizen.phone
'comment''comment'citizen.comment
'provisionalBooking''provisionalBooking'citizen.provisional_booking
'confirmed''confirmed'citizen.confirmed
'callSuccessful''callSuccessful'citizen.call_successful
'callTime''callTime'citizen.call_time
'pickupPerson''pickupPerson'citizen.pickup_person
'queueNumber''queueNumber'citizen.queue_number
'queueNumberDate''queueNumberDate'citizen.queue_number_date
'waitingTime''waitingTime'citizen.waiting_time
'processingTime''processingTime'citizen.processing_time
'parked''parked'citizen.parked
'wasMissed''wasMissed'citizen.was_missed
'apiClientId''apiClientId'citizen.api_client_id
'source''source'citizen.source
'lastChange''lastChange'citizen.updated_at

Phase 3: Provider & Request Mappings (Lower Priority)

Provider Query Class

Current MappingNew Mapping (camelCase)Database Column (snake_case)
'contact**city''contactCity'provider.contact_city
'contact**country''contactCountry'provider.contact_country
'contact**name''contactName'provider.name
'contact**postalCode''contactPostalCode'provider.contact_postal_code
'contact**region''contactRegion'provider.contact_region
'contact**street''contactStreet'provider.contact_street
'contact__streetNumber''contactStreetNumber'provider.contact_street_number
'id''id'provider.id
'link''link'provider.link
'name''name'provider.name
'displayName''displayName'provider.display_name
'source''source'provider.source
'data''data'provider.data