diff --git a/docs/components/mdx/database-tables.tsx b/docs/components/mdx/database-tables.tsx
index 9b8b844b..db6e826d 100644
--- a/docs/components/mdx/database-tables.tsx
+++ b/docs/components/mdx/database-tables.tsx
@@ -8,8 +8,14 @@ import {
TableRow,
} from "@/components/ui/table";
import { Badge } from "@/components/ui/badge";
-import { Key, Link } from "lucide-react";
+import { CircleDot, Key, Link } from "lucide-react";
import { Label } from "../ui/label";
+import {
+ Tooltip,
+ TooltipContent,
+ TooltipProvider,
+ TooltipTrigger,
+} from "../ui/tooltip";
interface Field {
name: string;
@@ -17,6 +23,7 @@ interface Field {
description: string;
isPrimaryKey?: boolean;
isForeignKey?: boolean;
+ isOptional?: boolean;
}
interface DatabaseTableProps {
@@ -47,22 +54,51 @@ export default function DatabaseTable({ fields }: DatabaseTableProps) {
{field.isPrimaryKey && (
-
-
- PK
-
+
+
+
+
+
+ PK
+
+
+ Primary Key
+
+
)}
{field.isForeignKey && (
-
-
- FK
-
+
+
+
+
+
+ FK
+
+
+ Foreign Key
+
+
)}
- {!field.isPrimaryKey && !field.isForeignKey && (
- -
+ {!field.isPrimaryKey &&
+ !field.isForeignKey &&
+ !field.isOptional && (
+ -
+ )}
+ {field.isOptional && (
+
+
+
+ ?
+
+ Optional
+
+
)}
{field.description}
diff --git a/docs/content/docs/concepts/database.mdx b/docs/content/docs/concepts/database.mdx
index 974b99ce..456fbb16 100644
--- a/docs/content/docs/concepts/database.mdx
+++ b/docs/content/docs/concepts/database.mdx
@@ -178,6 +178,12 @@ Table Name: `user`
type: "string",
description: "User's email address for communication and login"
},
+ {
+ name: "image",
+ type: "string",
+ description: "User's image url",
+ isOptional: true
+ },
{
name: "createdAt",
type: "Date",
@@ -217,12 +223,14 @@ Table Name: `session`
{
name: "ipAddress",
type: "string",
- description: "The IP address of the device"
+ description: "The IP address of the device",
+ isOptional: true
},
{
name: "userAgent",
type: "string",
- description: "The user agent information of the device"
+ description: "The user agent information of the device",
+ isOptional: true
},
]}
/>
@@ -259,21 +267,25 @@ Table Name: `account`
name: "accessToken",
type: "string",
description: "The access token of the account. Returned by the provider",
+ isOptional: true,
},
{
name: "refreshToken",
type: "string",
description: "The refresh token of the account. Returned by the provider",
+ isOptional: true,
},
{
name: "expiresAt",
type: "Date",
description: "The time when the access token expires",
+ isOptional: true,
},
{
name: "password",
type: "string",
description: "The password of the account. Mainly used for email and password authentication",
+ isOptional: true,
},
]}
/>
diff --git a/docs/content/docs/plugins/2fa.mdx b/docs/content/docs/plugins/2fa.mdx
index ac05da60..8b72ef71 100644
--- a/docs/content/docs/plugins/2fa.mdx
+++ b/docs/content/docs/plugins/2fa.mdx
@@ -282,9 +282,9 @@ The plugin requires 3 additional fields in the `user` table.
diff --git a/docs/content/docs/plugins/anonymous.mdx b/docs/content/docs/plugins/anonymous.mdx
index 224c5c52..93340eb9 100644
--- a/docs/content/docs/plugins/anonymous.mdx
+++ b/docs/content/docs/plugins/anonymous.mdx
@@ -106,6 +106,6 @@ The anonymous plugin requires an additional field in the user table:
diff --git a/docs/content/docs/plugins/organization.mdx b/docs/content/docs/plugins/organization.mdx
index fa99d7ed..4d9292cd 100644
--- a/docs/content/docs/plugins/organization.mdx
+++ b/docs/content/docs/plugins/organization.mdx
@@ -525,12 +525,14 @@ Table Name: `organization`
{
name: "logo",
type: "string",
- description: "The logo of the organization"
+ description: "The logo of the organization",
+ isOptional: true
},
{
name: "metadata",
type: "string",
- description: "Additional metadata for the organization"
+ description: "Additional metadata for the organization",
+ isOptional: true
},
{
name: "createdAt",