Skip to content

Commit

Permalink
add completed tutorial to existing workspaces
Browse files Browse the repository at this point in the history
  • Loading branch information
vieiralucas committed Jan 7, 2025
1 parent 218b9ba commit e1b84a2
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
-- Insert a completed tutorial for all workspaces without an existing tutorial
INSERT INTO "OnboardingTutorial" ("workspaceId", "currentStep", "isComplete", "isDismissed")
SELECT
w."id", -- Workspace ID
'inviteTeamMembers', -- Set the current step to the last step of the tutorial
true, -- Mark the tutorial as complete
true -- Mark as dismissed
FROM
"Workspace" w
LEFT JOIN
"OnboardingTutorial" ot ON w."id" = ot."workspaceId"
WHERE
ot."workspaceId" IS NULL; -- Only add for workspaces without a tutorial

0 comments on commit e1b84a2

Please sign in to comment.