SQL
CREATE TABLE "invitation" (
`id` text PRIMARY KEY NOT NULL,
`organizationId` text NOT NULL,
`email` text NOT NULL,
`role` text NOT NULL,
`status` text DEFAULT 'pending' NOT NULL,
`inviterId` text NOT NULL,
`teamId` text,
`expiresAt` integer,
`createdAt` integer NOT NULL,
FOREIGN KEY (`organizationId`) REFERENCES `organization`(`id`) ON UPDATE no action ON DELETE cascade,
FOREIGN KEY (`inviterId`) REFERENCES `user`(`id`) ON UPDATE no action ON DELETE cascade
)
Columns
| Column | Data type | Allow null | Primary key | Actions |
|---|---|---|---|---|
id |
TEXT |
✓ | Rename | Drop | |
organizationId |
TEXT |
Rename | Drop | ||
email |
TEXT |
Rename | Drop | ||
role |
TEXT |
Rename | Drop | ||
status |
TEXT |
Rename | Drop | ||
inviterId |
TEXT |
Rename | Drop | ||
teamId |
TEXT |
✓ | Rename | Drop | |
expiresAt |
INTEGER |
✓ | Rename | Drop | |
createdAt |
INTEGER |
Rename | Drop |
Foreign Keys
| Column | Destination |
|---|---|
inviterId |
user.id |
organizationId |
organization.id |
Indexes
| Name | Columns | Unique | SQL | Drop? |
|---|---|---|---|---|
| sqlite_autoindex_invitation_1 |
id
|
✓ | SQL | Drop |