CREATE TABLE `organisation_members` (
  `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
  `email` text NOT NULL,
  `display_name` text,
  `role` text DEFAULT 'learner' NOT NULL,
  `status` text DEFAULT 'invited' NOT NULL,
  `invited_by` text NOT NULL,
  `created_at` text NOT NULL,
  `updated_at` text NOT NULL
);
--> statement-breakpoint
CREATE UNIQUE INDEX `organisation_members_email_unique` ON `organisation_members` (`email`);
--> statement-breakpoint
CREATE INDEX `organisation_members_status_idx` ON `organisation_members` (`status`);
