SQL
CREATE TABLE "member" (
`id` text PRIMARY KEY NOT NULL,
`organizationId` text NOT NULL,
`userId` text NOT NULL,
`role` text NOT NULL,
`createdAt` integer NOT NULL,
FOREIGN KEY (`organizationId`) REFERENCES `organization`(`id`) ON UPDATE no action ON DELETE cascade,
FOREIGN KEY (`userId`) 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 | ||
userId |
TEXT |
Rename | Drop | ||
role |
TEXT |
Rename | Drop | ||
createdAt |
INTEGER |
Rename | Drop |
Foreign Keys
| Column | Destination |
|---|---|
userId |
user.id |
organizationId |
organization.id |
Indexes
| Name | Columns | Unique | SQL | Drop? |
|---|---|---|---|---|
| sqlite_autoindex_member_1 |
id
|
✓ | SQL | Drop |