diff --git a/models/contacts/contacts.yml b/models/contacts/contacts.yml index 1caf0aac..96e840f9 100644 --- a/models/contacts/contacts.yml +++ b/models/contacts/contacts.yml @@ -7,7 +7,7 @@ models: enforced: true columns: - name: uuid - data_type: string + data_type: text constraints: - type: foreign_key expression: "{{ env_var('POSTGRES_SCHEMA') }}.document_metadata (uuid) ON DELETE CASCADE" @@ -27,28 +27,28 @@ models: data_tests: - not_null - name: parent_uuid - data_type: string + data_type: text - name: name - data_type: string + data_type: text data_tests: - not_null - name: contact_type - data_type: string + data_type: text data_tests: - not_null - name: active - data_type: string + data_type: text - name: notes - data_type: string + data_type: text - name: muted - data_type: string + data_type: text - name: contact_type config: contract: enforced: true columns: - name: id - data_type: string + data_type: text - name: person data_type: boolean - name: configured @@ -59,7 +59,7 @@ models: enforced: true columns: - name: uuid - data_type: string + data_type: text constraints: - type: foreign_key expression: "{{ env_var('POSTGRES_SCHEMA') }}.contact (uuid) ON DELETE CASCADE" @@ -72,20 +72,20 @@ models: - name: saved_timestamp data_type: timestamp - name: sex - data_type: string + data_type: text - name: patient_id - data_type: string + data_type: text - name: phone - data_type: string + data_type: text - name: phone2 - data_type: string + data_type: text - name: place config: contract: enforced: true columns: - name: uuid - data_type: string + data_type: text constraints: - type: foreign_key expression: "{{ env_var('POSTGRES_SCHEMA') }}.contact (uuid) ON DELETE CASCADE" @@ -97,16 +97,16 @@ models: - name: saved_timestamp data_type: timestamp - name: place_id - data_type: string + data_type: text - name: contact_id - data_type: string + data_type: text - name: patient config: contract: enforced: true columns: - name: uuid - data_type: string + data_type: text constraints: - type: foreign_key expression: "{{ env_var('POSTGRES_SCHEMA') }}.contact (uuid) ON DELETE CASCADE" @@ -118,4 +118,4 @@ models: - name: saved_timestamp data_type: timestamp - name: patient_id - data_type: string + data_type: text diff --git a/models/forms/forms.yml b/models/forms/forms.yml index cbf125df..c2432257 100644 --- a/models/forms/forms.yml +++ b/models/forms/forms.yml @@ -7,7 +7,7 @@ models: enforced: true columns: - name: uuid - data_type: string + data_type: text constraints: - type: foreign_key expression: "{{ env_var('POSTGRES_SCHEMA') }}.document_metadata (uuid) ON DELETE CASCADE" @@ -22,16 +22,16 @@ models: - name: reported data_type: timestamp with time zone - name: form - data_type: string + data_type: text - name: from_phone - data_type: string + data_type: text - name: patient_id - data_type: string + data_type: text - name: place_id - data_type: string + data_type: text - name: contact_uuid - data_type: string + data_type: text - name: parent_uuid - data_type: string + data_type: text - name: grandparent_uuid - data_type: string + data_type: text diff --git a/models/root/root.yml b/models/root/root.yml index 7a68fcf9..962dee94 100644 --- a/models/root/root.yml +++ b/models/root/root.yml @@ -13,7 +13,7 @@ models: enforced: true columns: - name: uuid - data_type: string + data_type: text constraints: - type: unique data-tests: @@ -30,6 +30,6 @@ models: - accepted_values: values: [true, false] - name: doc_type - data_type: string + data_type: text data-tests: - not_null diff --git a/models/users/user.yml b/models/users/user.yml index eb133a65..8c724a38 100644 --- a/models/users/user.yml +++ b/models/users/user.yml @@ -7,7 +7,7 @@ models: enforced: true columns: - name: user_id - data_type: string + data_type: text constraints: - type: unique - type: foreign_key @@ -22,23 +22,23 @@ models: data_tests: - not_null - name: contact_uuid - data_type: string + data_type: text data_tests: - not_null - relationships: to: ref('contact') field: uuid - name: language - data_type: string + data_type: text - name: roles - data_type: string + data_type: text - name: feedback config: contract: enforced: true columns: - name: uuid - data_type: string + data_type: text constraints: - type: unique - type: foreign_key @@ -53,24 +53,24 @@ models: data_tests: - not_null - name: source - data_type: string + data_type: text - name: url - data_type: string + data_type: text - name: user_name - data_type: string + data_type: text - name: period_start - data_type: string + data_type: text - name: cause - data_type: string + data_type: text - name: message - data_type: string + data_type: text - name: telemetry config: contract: enforced: true columns: - name: uuid - data_type: string + data_type: text constraints: - type: unique - type: foreign_key @@ -87,24 +87,24 @@ models: - name: period_start data_type: timestamp with time zone - name: user_name - data_type: string + data_type: text - name: app_version - data_type: string + data_type: text - name: boot_time_min - data_type: string + data_type: text - name: boot_time_max - data_type: string + data_type: text - name: boot_time_count - data_type: string + data_type: text - name: doc_count_on_local_db - data_type: string + data_type: text - name: telemetry_devices config: contract: enforced: true columns: - name: uuid - data_type: string + data_type: text constraints: - type: unique - type: foreign_key @@ -121,20 +121,20 @@ models: - name: period_start data_type: timestamp with time zone - name: device_manufacturer - data_type: string + data_type: text - name: device_model - data_type: string + data_type: text - name: user_agent - data_type: string + data_type: text - name: cht_android_version - data_type: string + data_type: text - name: android_version - data_type: string + data_type: text - name: storage_free - data_type: string + data_type: text - name: storage_total - data_type: string + data_type: text - name: network_up_speed - data_type: string + data_type: text - name: network_down_speed - data_type: string + data_type: text