diff --git a/archiver_test.go b/archiver_test.go index 87cbf84..6219355 100644 --- a/archiver_test.go +++ b/archiver_test.go @@ -488,7 +488,7 @@ func TestArchiveOrgRuns(t *testing.T) { assert.Equal(t, DayPeriod, created[11].Period) assert.Equal(t, 1, created[11].RecordCount) assert.Equal(t, int64(427), created[11].Size) - assert.Equal(t, "bf08041cef314492fee2910357ec4189", created[11].Hash) + assert.Equal(t, "ca36409e2623005b12c221cb3502cc30", created[11].Hash) assert.Equal(t, 12, len(deleted)) diff --git a/testdb.sql b/testdb.sql index c24a175..152bf26 100644 --- a/testdb.sql +++ b/testdb.sql @@ -166,7 +166,7 @@ DROP TABLE IF EXISTS flows_flowrun CASCADE; CREATE TABLE flows_flowrun ( id serial primary key, is_active boolean NOT NULL DEFAULT FALSE, - uuid character varying(36) NOT NULL, + uuid character varying(36) NOT NULL UNIQUE, responded boolean NOT NULL, contact_id integer NOT NULL references contacts_contact(id), flow_id integer NOT NULL references flows_flow(id), @@ -319,7 +319,7 @@ INSERT INTO flows_flowrun(id, uuid, responded, contact_id, flow_id, org_id, resu '[{"uuid": "600ac5b4-4895-4161-ad97-6e2f1bb48bcb", "node_uuid": "accbc6e2-b0df-46cd-9a76-bff0fdf4d753", "arrived_on": "2017-08-12T15:07:24.049815+02:00", "exit_uuid": "8249e2dc-c893-4200-b6d2-398d07a459bc"}]', '[{"msg": {"urn": "tel:+12076661212", "text": "hola", "uuid": "9ea50923-0888-4596-9a9d-4890994934a9", "channel": {"name": "1223", "uuid": "d6597e08-8285-428c-8e7e-97c68adfa073"}}, "type": "msg_created", "step_uuid": "ae067248-df92-41c8-bb29-92506e984259", "created_on": "2018-01-22T15:06:47.357682+00:00"}]', '2017-08-10 21:11:59.890662+02:00','2017-08-10 21:11:59.890662+02:00','2017-08-10 21:11:59.890662+02:00', 'C', 'C', NULL, 1), -(4, 'de782b35-a398-46ed-8550-34c66053841b', TRUE, 7, 2, 3, +(4, '329a5d24-64fc-479c-8d24-9674c9b46530', TRUE, 7, 2, 3, '{"agree": {"category": "Disagree", "node_uuid": "084c8cf1-715d-4d0a-b38d-a616ed74e638", "name": "Agree", "value": "B", "created_on": "2017-10-10T12:25:21.714339+00:00", "input": "B"}}', '[{"uuid": "babf4fc8-e12c-4bb9-a9dd-61178a118b5a", "node_uuid": "accbc6e2-b0df-46cd-9a76-bff0fdf4d753", "arrived_on": "2017-10-12T15:07:24.049815+02:00", "exit_uuid": "8249e2dc-c893-4200-b6d2-398d07a459bc"}]', '[{"msg": {"urn": "tel:+12076661212", "text": "hi hi", "uuid": "543d2c4b-ff0b-4b87-a9a4-b2d6745cf470", "channel": {"name": "1223", "uuid": "d6597e08-8285-428c-8e7e-97c68adfa073"}}, "type": "msg_created", "step_uuid": "3a5014dd-7b14-4b7a-be52-0419c09340a6", "created_on": "2018-10-12T15:06:47.357682+00:00"}]',