| 1 | -- Each person's own state of a workspace's setup guide (Getting started), |
| 2 | -- per workspace: when they dismissed it, so it stops opening by itself on |
| 3 | -- the workspace's Home, and the steps they chose to skip (`skipped`, a JSON |
| 4 | -- array of step keys such as ["people","runner"]). Whether a step is done |
| 5 | -- is read from the workspace itself, never kept here. A person with no row |
| 6 | -- for a workspace has never dismissed it, so it opens for every owner of a |
| 7 | -- workspace made before this table, too. Keyed by the workspace's id so a |
| 8 | -- rename keeps it. See src/onboarding.rs. |
| 9 | CREATE TABLE onboarding ( |
| 10 | user_id TEXT NOT NULL REFERENCES users (id) ON DELETE CASCADE, |
| 11 | workspace_id TEXT NOT NULL REFERENCES workspaces (id) ON DELETE CASCADE, |
| 12 | dismissed_at TEXT, |
| 13 | skipped TEXT NOT NULL DEFAULT '[]', |
| 14 | updated_at TEXT NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ', 'now')), |
| 15 | PRIMARY KEY (user_id, workspace_id) |
| 16 | ); |