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.

2.3 KB
Raw Blame
INSERT INTO public."macro_user" ("id", "username", "email", "stripe_customer_id")
VALUES ('a1111111-1111-1111-1111-111111111111', '[email protected]', '[email protected]', 'stripe_id'),
       ('a2222222-2222-2222-2222-222222222222', '[email protected]', '[email protected]', 'stripe_id2');

INSERT INTO public."User" ("id","email","stripeCustomerId","macro_user_id")
(SELECT 'macro|[email protected]', '[email protected]','stripe_id', 'a1111111-1111-1111-1111-111111111111');

INSERT INTO public."User" ("id","email","stripeCustomerId","macro_user_id")
(SELECT 'macro|[email protected]', '[email protected]','stripe_id2', 'a2222222-2222-2222-2222-222222222222');

-- Should have user history for user
INSERT INTO public."Project" ("id", "name", "userId", "deletedAt")
(SELECT 'p1', 'a', 'macro|[email protected]', '2019-10-16 00:00:00');

-- Should have user history for user
INSERT INTO public."Project" ("id", "name", "userId", "parentId", "deletedAt")
(SELECT 'p2', 'b', 'macro|[email protected]', 'p1', '2019-10-16 00:00:00');

-- Should have user history for user2
INSERT INTO public."Project" ("id", "name", "userId", "parentId", "deletedAt")
(SELECT 'p3', 'c', 'macro|[email protected]', 'p2', '2019-10-16 00:00:00');

-- Should have user history for user
INSERT INTO public."Document" ("id", "name", "fileType", "owner", "deletedAt", "projectId")
(SELECT 'd1', 'd1', 'docx', 'macro|[email protected]', '2019-10-16 00:00:00', 'p1');

-- Should have user history for user2
INSERT INTO public."Document" ("id", "name", "fileType", "owner", "deletedAt", "projectId")
(SELECT 'd2', 'd2', 'docx', 'macro|[email protected]', '2019-10-16 00:00:00', 'p2');

-- Should not be reverted as it's not deleted
INSERT INTO public."Document" ("id", "name", "fileType", "owner", "projectId")
(SELECT 'd3', 'd3', 'docx', 'macro|[email protected]', 'p3');

-- Should have user history for user
INSERT INTO public."Chat" ("id", "name", "userId", "deletedAt", "projectId")
(SELECT 'c1', 'c1', 'macro|[email protected]', '2019-10-16 00:00:00', 'p1');

-- Should have user history for user2
INSERT INTO public."Chat" ("id", "name", "userId", "deletedAt", "projectId")
(SELECT 'c2', 'c2', 'macro|[email protected]', '2019-10-16 00:00:00', 'p2');

-- Should not be reverted as it's not deleted
INSERT INTO public."Chat" ("id", "name", "userId", "projectId")
(SELECT 'c3', 'c3', 'macro|[email protected]', 'p3');