improve email formatting and invite flow for new users

This commit is contained in:
Milo Schwartz 2024-12-31 18:25:11 -05:00
parent d244d6003b
commit d447de9e8a
No known key found for this signature in database
15 changed files with 107 additions and 89 deletions

View file

@ -131,7 +131,7 @@ export const newtSessions = sqliteTable("newtSession", {
export const userOrgs = sqliteTable("userOrgs", {
userId: text("userId")
.notNull()
.references(() => users.userId),
.references(() => users.userId, { onDelete: "cascade" }),
orgId: text("orgId")
.references(() => orgs.orgId, {
onDelete: "cascade"
@ -395,4 +395,4 @@ export type ResourcePassword = InferSelectModel<typeof resourcePassword>;
export type ResourceOtp = InferSelectModel<typeof resourceOtp>;
export type ResourceAccessToken = InferSelectModel<typeof resourceAccessToken>;
export type ResourceWhitelist = InferSelectModel<typeof resourceWhitelist>;
export type VersionMigration = InferSelectModel<typeof versionMigrations>;
export type VersionMigration = InferSelectModel<typeof versionMigrations>;