diff --git a/pkg/gordio/database/calls.sql.go b/pkg/gordio/database/calls.sql.go index b7489f5..f7adab0 100644 --- a/pkg/gordio/database/calls.sql.go +++ b/pkg/gordio/database/calls.sql.go @@ -17,7 +17,7 @@ INSERT INTO calls ( submitter, system, talkgroup, - date, + call_date, audio_name, audio_blob, audio_type, @@ -28,14 +28,14 @@ INSERT INTO calls ( tg_label, source ) VALUES (gen_random_uuid(), $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13) -RETURNING id, submitter, system, talkgroup, date, audio_name, audio_blob, audio_type, audio_url, frequency, frequencies, patches, tg_label, source, transcript +RETURNING id, submitter, system, talkgroup, call_date, audio_name, audio_blob, audio_type, audio_url, frequency, frequencies, patches, tg_label, source, transcript ` type AddCallParams struct { Submitter pgtype.Int4 System int32 Talkgroup int32 - Date pgtype.Timestamp + CallDate pgtype.Timestamp AudioName pgtype.Text AudioBlob []byte AudioType pgtype.Text @@ -52,7 +52,7 @@ func (q *Queries) AddCall(ctx context.Context, arg AddCallParams) (Call, error) arg.Submitter, arg.System, arg.Talkgroup, - arg.Date, + arg.CallDate, arg.AudioName, arg.AudioBlob, arg.AudioType, @@ -69,7 +69,7 @@ func (q *Queries) AddCall(ctx context.Context, arg AddCallParams) (Call, error) &i.Submitter, &i.System, &i.Talkgroup, - &i.Date, + &i.CallDate, &i.AudioName, &i.AudioBlob, &i.AudioType, diff --git a/pkg/gordio/database/models.go b/pkg/gordio/database/models.go index 1ef2735..7ddba7a 100644 --- a/pkg/gordio/database/models.go +++ b/pkg/gordio/database/models.go @@ -22,7 +22,7 @@ type Call struct { Submitter pgtype.Int4 System int32 Talkgroup int32 - Date pgtype.Timestamp + CallDate pgtype.Timestamp AudioName pgtype.Text AudioBlob []byte AudioType pgtype.Text diff --git a/sql/postgres/migrations/001_initial.up.sql b/sql/postgres/migrations/001_initial.up.sql index 2ac6a97..13af2e0 100644 --- a/sql/postgres/migrations/001_initial.up.sql +++ b/sql/postgres/migrations/001_initial.up.sql @@ -39,7 +39,7 @@ CREATE TABLE IF NOT EXISTS calls( submitter INTEGER REFERENCES api_keys(id) ON DELETE SET NULL, system INTEGER NOT NULL, talkgroup INTEGER NOT NULL, - date TIMESTAMP NOT NULL, + call_date TIMESTAMP NOT NULL, audio_name TEXT, audio_blob BYTEA, audio_type TEXT, diff --git a/sql/postgres/queries/calls.sql b/sql/postgres/queries/calls.sql index 38f7fa1..00694bb 100644 --- a/sql/postgres/queries/calls.sql +++ b/sql/postgres/queries/calls.sql @@ -4,7 +4,7 @@ INSERT INTO calls ( submitter, system, talkgroup, - date, + call_date, audio_name, audio_blob, audio_type,