From 815de9906a014c2eb1a4fe2bd8cf1b3077f03c9c Mon Sep 17 00:00:00 2001
From: Mathias Magnusson <mathias@magnusson.space>
Date: Thu, 14 Aug 2025 18:42:27 +0200
Subject: Add passkey authentication

---
 migrations/0000_bitter_xorn.sql | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 migrations/0000_bitter_xorn.sql

(limited to 'migrations/0000_bitter_xorn.sql')

diff --git a/migrations/0000_bitter_xorn.sql b/migrations/0000_bitter_xorn.sql
new file mode 100644
index 0000000..4f4c445
--- /dev/null
+++ b/migrations/0000_bitter_xorn.sql
@@ -0,0 +1,25 @@
+CREATE TABLE `groups` (
+	`id` integer PRIMARY KEY NOT NULL,
+	`name` text NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE `sessions` (
+	`id` integer PRIMARY KEY NOT NULL,
+	`uuid` text NOT NULL,
+	`user_id` integer NOT NULL
+);
+--> statement-breakpoint
+CREATE UNIQUE INDEX `sessions_uuid_unique` ON `sessions` (`uuid`);--> statement-breakpoint
+CREATE TABLE `users` (
+	`id` integer PRIMARY KEY NOT NULL,
+	`name` text NOT NULL,
+	`passkey` text,
+	`passkey_id` text NOT NULL
+);
+--> statement-breakpoint
+CREATE UNIQUE INDEX `users_name_unique` ON `users` (`name`);--> statement-breakpoint
+CREATE TABLE `webauthn_challenges` (
+	`id` integer PRIMARY KEY NOT NULL,
+	`challenge` text NOT NULL,
+	`key` text NOT NULL
+);
-- 
cgit v1.2.3

