Skip to content

Commit 4b3d7fe

Browse files
committed
Start writing status field on channel events as P
1 parent 746618b commit 4b3d7fe

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Diff for: backends/rapidpro/channel_event.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ func writeChannelEvent(ctx context.Context, b *backend, event courier.ChannelEve
134134

135135
const sqlInsertChannelEvent = `
136136
INSERT INTO
137-
channels_channelevent( org_id, channel_id, contact_id, contact_urn_id, event_type, optin_id, extra, occurred_on, created_on, log_uuids)
138-
VALUES(:org_id, :channel_id, :contact_id, :contact_urn_id, :event_type, :optin_id, :extra, :occurred_on, NOW(), :log_uuids)
137+
channels_channelevent( org_id, channel_id, contact_id, contact_urn_id, event_type, optin_id, extra, occurred_on, created_on, status, log_uuids)
138+
VALUES(:org_id, :channel_id, :contact_id, :contact_urn_id, :event_type, :optin_id, :extra, :occurred_on, NOW(), 'P', :log_uuids)
139139
RETURNING id, created_on`
140140

141141
// writeChannelEventToDB writes the passed in channel event to our db

Diff for: backends/rapidpro/schema.sql

+1
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ DROP TABLE IF EXISTS channels_channelevent CASCADE;
113113
CREATE TABLE channels_channelevent (
114114
id serial primary key,
115115
event_type character varying(16) NOT NULL,
116+
status character varying(1) NOT NULL,
116117
extra text,
117118
occurred_on timestamp with time zone NOT NULL,
118119
created_on timestamp with time zone NOT NULL,

0 commit comments

Comments
 (0)