Add collab APIs for new signup flow
Co-authored-by: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
f081dbced5
commit
d85ecc8302
3 changed files with 338 additions and 1 deletions
25
crates/collab/migrations/20220913211150_create_signups.sql
Normal file
25
crates/collab/migrations/20220913211150_create_signups.sql
Normal file
|
@ -0,0 +1,25 @@
|
|||
CREATE SEQUENCE metrics_id_seq;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS "signups" (
|
||||
"id" SERIAL PRIMARY KEY NOT NULL,
|
||||
"email_address" VARCHAR NOT NULL,
|
||||
"email_confirmation_code" VARCHAR(64) NOT NULL,
|
||||
"email_confirmation_sent" BOOLEAN NOT NULL,
|
||||
"metrics_id" INTEGER NOT NULL DEFAULT nextval('metrics_id_seq'),
|
||||
"created_at" TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"user_id" INTEGER REFERENCES users (id),
|
||||
|
||||
"platform_mac" BOOLEAN NOT NULL,
|
||||
"platform_linux" BOOLEAN NOT NULL,
|
||||
"platform_windows" BOOLEAN NOT NULL,
|
||||
"platform_unknown" BOOLEAN NOT NULL,
|
||||
|
||||
"editor_features" VARCHAR[] NOT NULL,
|
||||
"programming_languages" VARCHAR[] NOT NULL
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX "index_signups_on_email_address" ON "signups" ("email_address");
|
||||
CREATE INDEX "index_signups_on_email_confirmation_sent" ON "signups" ("email_confirmation_sent");
|
||||
|
||||
ALTER TABLE "users"
|
||||
ADD "metrics_id" INTEGER DEFAULT nextval('metrics_id_seq');
|
Loading…
Add table
Add a link
Reference in a new issue