Skip to content

Commit

Permalink
🐛 Fix sync
Browse files Browse the repository at this point in the history
  • Loading branch information
naelob committed Apr 10, 2024
1 parent 2f8d003 commit fea63d9
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/api/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ model connections {
expiration_timestamp DateTime? @db.Timestamp(6)
created_at DateTime @db.Timestamp(6)
connection_token String?
vertical String
id_project String @db.Uuid
id_linked_user String @db.Uuid
vertical String?
linked_users linked_users @relation(fields: [id_linked_user], references: [id_linked_user], onDelete: NoAction, onUpdate: NoAction, map: "fk_11")
projects projects @relation(fields: [id_project], references: [id_project], onDelete: NoAction, onUpdate: NoAction, map: "fk_9")
Expand Down
11 changes: 11 additions & 0 deletions packages/api/scripts/seed.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@
INSERT INTO users (id_user, identification_strategy, email, password_hash, first_name, last_name) VALUES
('0ce39030-2901-4c56-8db0-5e326182ec6b', 'b2c','[email protected]', '$2b$10$Nxcp3x0yDaCrMrhZQ6IiNeqk0BxxDTnfn9iGG2UK5nWMh/UB6LgZu', 'Audrey', 'Aubry');

DO $$
DECLARE
user_id UUID;
BEGIN
SELECT id_user INTO user_id FROM users WHERE email = '[email protected]';
INSERT INTO projects (id_project, name, id_organization, sync_mode, id_user) VALUES
('1e468c15-aa57-4448-aa2b-7fed640d1e3d', 'Project 1', 'pool', user_id),
('4c641a21-a7f8-4ffe-b7e8-e7d32db87557', 'Project 2', 'pool', user_id),
('2b198012-c79c-4bb6-971e-9635830e8c15', 'Project 3', 'pool', user_id);
END $$;

-- DO $$
-- DECLARE
--org_id UUID;
Expand Down
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 comment on commit fea63d9

@vercel
Copy link

@vercel vercel bot commented on fea63d9 Apr 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.