Migrate contact_email and contact_phone to allow dupes

The key item here is that comms.phone and comms.email are meant to
represent a real global namespace, but comms.contact is meant to
represent an organization-specific namespace. This means the mapping,
comms.contact_phone and comms.contact_email can't key off the global
namespace. Otherwise the contact namespace would implicitly be global.
This commit is contained in:
Eli Ribble 2026-05-22 15:13:03 +00:00
parent a72f228e4e
commit f957dc6982
No known key found for this signature in database
14 changed files with 250 additions and 44 deletions

View file

@ -33,8 +33,8 @@ func NewEmailSend(ctx context.Context, txn bob.Executor, email_id int32) error {
func NewLabelStudioAudioCreate(ctx context.Context, txn bob.Executor, note_audio_id int32) error {
return newJob(ctx, txn, enums.JobtypeLabelStudioAudioCreate, note_audio_id)
}
func NewTextRespond(ctx context.Context, txn bob.Executor, text_id int32) error {
return newJob(ctx, txn, enums.JobtypeTextRespond, text_id)
func NewTextRespond(ctx context.Context, txn db.Ex, text_id int32) error {
return newJob2(ctx, txn, model.Jobtype_TextRespond, text_id)
}
func NewTextSend(ctx context.Context, txn db.Ex, job_id int32) error {
return newJob2(ctx, txn, model.Jobtype_TextSend, job_id)