Add configurable onboarding and scoped invitation links
This commit is contained in:
+1
-6
@@ -62,16 +62,11 @@ CREATE TABLE auth_rate_limits (
|
||||
expires_at timestamptz NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE onboarding_configs (
|
||||
project text PRIMARY KEY,
|
||||
require_workspace boolean NOT NULL DEFAULT false,
|
||||
questions jsonb NOT NULL DEFAULT '[]' CHECK (jsonb_typeof(questions) = 'array'),
|
||||
updated_at timestamptz NOT NULL DEFAULT now()
|
||||
);
|
||||
CREATE TABLE onboarding_responses (
|
||||
project text NOT NULL,
|
||||
account_id uuid NOT NULL,
|
||||
answers jsonb NOT NULL DEFAULT '{}' CHECK (jsonb_typeof(answers) = 'object'),
|
||||
result jsonb NOT NULL DEFAULT '{}' CHECK (jsonb_typeof(result) = 'object'),
|
||||
completed_at timestamptz NOT NULL DEFAULT now(),
|
||||
PRIMARY KEY (project, account_id),
|
||||
FOREIGN KEY (project, account_id) REFERENCES project_accounts ON DELETE CASCADE
|
||||
|
||||
Reference in New Issue
Block a user