Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

1.5 KB
Raw Blame
-- SQL fixture for upsert_contacts (sync) name change detection tests

------------------------------------------------------------
-- Link
------------------------------------------------------------

INSERT INTO email_links (id, macro_id, fusionauth_user_id, email_address, provider, is_sync_active, created_at, updated_at)
VALUES ('00000000-0000-0000-0000-000000000801', 'macro|[email protected]', '00000000-0000-0000-0000-000000000801',
        '[email protected]', 'GMAIL', true, NOW(), NOW());

------------------------------------------------------------
-- Pre-existing contacts
------------------------------------------------------------

-- Contact with a name (will test name change)
INSERT INTO email_contacts (id, link_id, email_address, name, created_at, updated_at)
VALUES ('00000000-0000-0000-0000-0000000c8001',
        '00000000-0000-0000-0000-000000000801',
        '[email protected]',
        'Old Alice',
        NOW(), NOW());

-- Contact with no name (will test null -> name)
INSERT INTO email_contacts (id, link_id, email_address, name, created_at, updated_at)
VALUES ('00000000-0000-0000-0000-0000000c8002',
        '00000000-0000-0000-0000-000000000801',
        '[email protected]',
        NULL,
        NOW(), NOW());

-- Contact whose name won't change
INSERT INTO email_contacts (id, link_id, email_address, name, created_at, updated_at)
VALUES ('00000000-0000-0000-0000-0000000c8003',
        '00000000-0000-0000-0000-000000000801',
        '[email protected]',
        'Charlie',
        NOW(), NOW());