Skip to content

Commit

Permalink
Merge pull request rapidpro#344 from nyaruka/bigid
Browse files Browse the repository at this point in the history
switch id to bigserial
  • Loading branch information
nicpottier authored Jan 1, 2021
2 parents caff953 + 021e1d2 commit b96eeb9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion backends/rapidpro/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ CREATE TABLE contacts_contacturn (

DROP TABLE IF EXISTS msgs_msg CASCADE;
CREATE TABLE msgs_msg (
id serial primary key,
id bigserial primary key,
uuid character varying(36) NULL,
text text NOT NULL,
high_priority boolean NULL,
Expand Down
5 changes: 3 additions & 2 deletions backends/rapidpro/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ import (
"encoding/json"
"errors"
"fmt"
"github.com/nyaruka/gocommon/urns"
"log"
"os"
"strconv"
"time"

"github.com/nyaruka/gocommon/urns"

"github.com/jmoiron/sqlx"
"github.com/nyaruka/courier"
)
Expand Down Expand Up @@ -284,7 +285,7 @@ FROM
AS
s(msg_id, channel_id, status, external_id)
WHERE
msgs_msg.id = s.msg_id::int AND
msgs_msg.id = s.msg_id::bigint AND
msgs_msg.channel_id = s.channel_id::int AND
msgs_msg.direction = 'O'
RETURNING
Expand Down

0 comments on commit b96eeb9

Please sign in to comment.