CREATE TABLE `geo_project_members` (
	`id` text PRIMARY KEY NOT NULL,
	`project_id` text NOT NULL,
	`user_email` text NOT NULL,
	`role` text DEFAULT 'viewer' NOT NULL,
	`created_at` text NOT NULL,
	FOREIGN KEY (`project_id`) REFERENCES `geo_projects`(`id`) ON UPDATE no action ON DELETE cascade
);
--> statement-breakpoint
CREATE UNIQUE INDEX `geo_project_members_unique` ON `geo_project_members` (`project_id`,`user_email`);--> statement-breakpoint
CREATE INDEX `geo_project_members_email_idx` ON `geo_project_members` (`user_email`);