diff --git a/core/models/channel_connection.go b/core/models/channel_connection.go index 97b2dad15..9fb65f810 100644 --- a/core/models/channel_connection.go +++ b/core/models/channel_connection.go @@ -42,7 +42,6 @@ const ( ConnectionStatusPending = ConnectionStatus("P") ConnectionStatusQueued = ConnectionStatus("Q") ConnectionStatusWired = ConnectionStatus("W") - ConnectionStatusRinging = ConnectionStatus("R") ConnectionStatusInProgress = ConnectionStatus("I") ConnectionStatusBusy = ConnectionStatus("B") ConnectionStatusFailed = ConnectionStatus("F") @@ -79,7 +78,6 @@ type ChannelConnection struct { ContactID ContactID `json:"contact_id" db:"contact_id"` ContactURNID URNID `json:"contact_urn_id" db:"contact_urn_id"` OrgID OrgID `json:"org_id" db:"org_id"` - ErrorCount int `json:"error_count" db:"error_count"` StartID StartID `json:"start_id" db:"start_id"` } } @@ -113,7 +111,6 @@ INSERT INTO channel_id, contact_id, contact_urn_id, - error_count, retry_count ) @@ -129,7 +126,6 @@ VALUES( :channel_id, :contact_id, :contact_urn_id, - 0, 0 ) RETURNING @@ -205,7 +201,6 @@ SELECT cc.contact_id as contact_id, cc.contact_urn_id as contact_urn_id, cc.org_id as org_id, - cc.error_count as error_count, fsc.flowstart_id as start_id FROM channels_channelconnection as cc @@ -242,7 +237,6 @@ SELECT cc.contact_id as contact_id, cc.contact_urn_id as contact_urn_id, cc.org_id as org_id, - cc.error_count as error_count, fsc.flowstart_id as start_id FROM channels_channelconnection as cc @@ -284,7 +278,6 @@ SELECT cc.contact_id as contact_id, cc.contact_urn_id as contact_urn_id, cc.org_id as org_id, - cc.error_count as error_count, fsc.flowstart_id as start_id FROM channels_channelconnection as cc diff --git a/mailroom_test.dump b/mailroom_test.dump index f17efbfcf..f85d1aabc 100644 Binary files a/mailroom_test.dump and b/mailroom_test.dump differ diff --git a/testsuite/testdata/constants.go b/testsuite/testdata/constants.go index a8cce2cc6..f2629b1b4 100644 --- a/testsuite/testdata/constants.go +++ b/testsuite/testdata/constants.go @@ -57,8 +57,8 @@ var IncomingExtraFlow = &Flow{10006, "376d3de6-7f0e-408c-80d6-b1919738bc80"} var ParentTimeoutFlow = &Flow{10007, "81c0f323-7e06-4e0c-a960-19c20f17117c"} var CampaignFlow = &Flow{10009, "3a92a964-3a8d-420b-9206-2cd9d884ac30"} -var CreatedOnField = &Field{3, "fd18a69d-7514-4b76-9fad-072641995e17"} -var LastSeenOnField = &Field{5, "660ebe03-b717-4a80-aebf-9b7c718266e1"} +var CreatedOnField = &Field{3, "53499958-0a0a-48a5-bb5f-8f9f4d8af77b"} +var LastSeenOnField = &Field{5, "4307df2e-b00b-42b6-922b-4a1dcfc268d8"} var GenderField = &Field{6, "3a5891e4-756e-4dc9-8e12-b7a766168824"} var AgeField = &Field{7, "903f51da-2717-47c7-a0d3-f2f32877013d"} var JoinedField = &Field{8, "d83aae24-4bbf-49d0-ab85-6bfd201eac6d"} diff --git a/testsuite/testdata/contacts.go b/testsuite/testdata/contacts.go index 558509873..b898c3a01 100644 --- a/testsuite/testdata/contacts.go +++ b/testsuite/testdata/contacts.go @@ -50,8 +50,8 @@ type Field struct { func InsertContact(db *sqlx.DB, org *Org, uuid flows.ContactUUID, name string, language envs.Language) *Contact { var id models.ContactID must(db.Get(&id, - `INSERT INTO contacts_contact (org_id, is_active, status, uuid, name, language, created_on, modified_on, created_by_id, modified_by_id) - VALUES($1, TRUE, 'A', $2, $3, $4, NOW(), NOW(), 1, 1) RETURNING id`, org.ID, uuid, name, language, + `INSERT INTO contacts_contact (org_id, is_active, status, ticket_count, uuid, name, language, created_on, modified_on, created_by_id, modified_by_id) + VALUES($1, TRUE, 'A', 0, $2, $3, $4, NOW(), NOW(), 1, 1) RETURNING id`, org.ID, uuid, name, language, )) return &Contact{id, uuid, "", models.NilURNID} } diff --git a/web/org/metrics_test.go b/web/org/metrics_test.go index 63133b4ed..85d0faf73 100644 --- a/web/org/metrics_test.go +++ b/web/org/metrics_test.go @@ -82,7 +82,7 @@ func TestMetrics(t *testing.T) { Username: "metrics", Password: promToken, Contains: []string{ - `rapidpro_group_contact_count{group_name="Active",group_uuid="14f6ea01-456b-4417-b0b8-35e942f549f1",group_type="system",org="UNICEF"} 124`, + `rapidpro_group_contact_count{group_name="Active",group_uuid="b97f69f7-5edf-45c7-9fda-d37066eae91d",group_type="system",org="UNICEF"} 124`, `rapidpro_group_contact_count{group_name="Doctors",group_uuid="c153e265-f7c9-4539-9dbc-9b358714b638",group_type="user",org="UNICEF"} 121`, `rapidpro_channel_msg_count{channel_name="Vonage",channel_uuid="19012bfd-3ce3-4cae-9bb9-76cf92c73d49",channel_type="NX",msg_direction="out",msg_type="message",org="UNICEF"} 0`, },