summaryrefslogtreecommitdiff
path: root/migrations
diff options
context:
space:
mode:
Diffstat (limited to 'migrations')
-rw-r--r--migrations/0000_bitter_xorn.sql25
-rw-r--r--migrations/0000_parallel_overlord.sql3
-rw-r--r--migrations/meta/0000_snapshot.json125
-rw-r--r--migrations/meta/_journal.json4
4 files changed, 151 insertions, 6 deletions
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
+);
diff --git a/migrations/0000_parallel_overlord.sql b/migrations/0000_parallel_overlord.sql
deleted file mode 100644
index c1c0d28..0000000
--- a/migrations/0000_parallel_overlord.sql
+++ /dev/null
@@ -1,3 +0,0 @@
-CREATE TABLE `groups` (
- `name` text NOT NULL
-);
diff --git a/migrations/meta/0000_snapshot.json b/migrations/meta/0000_snapshot.json
index 245d657..ba0da3c 100644
--- a/migrations/meta/0000_snapshot.json
+++ b/migrations/meta/0000_snapshot.json
@@ -1,18 +1,141 @@
{
"version": "6",
"dialect": "sqlite",
- "id": "2b9ab579-4d91-4045-b35e-b5cceebe74de",
+ "id": "a2343f4c-71c5-4992-b49e-d30f2a4f08c0",
"prevId": "00000000-0000-0000-0000-000000000000",
"tables": {
"groups": {
"name": "groups",
"columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "sessions": {
+ "name": "sessions",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "uuid": {
+ "name": "uuid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "sessions_uuid_unique": {
+ "name": "sessions_uuid_unique",
+ "columns": [
+ "uuid"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "users": {
+ "name": "users",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
+ },
+ "passkey": {
+ "name": "passkey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "passkey_id": {
+ "name": "passkey_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "users_name_unique": {
+ "name": "users_name_unique",
+ "columns": [
+ "name"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "webauthn_challenges": {
+ "name": "webauthn_challenges",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "challenge": {
+ "name": "challenge",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
}
},
"indexes": {},
diff --git a/migrations/meta/_journal.json b/migrations/meta/_journal.json
index ccb08a8..3f28ad0 100644
--- a/migrations/meta/_journal.json
+++ b/migrations/meta/_journal.json
@@ -5,8 +5,8 @@
{
"idx": 0,
"version": "6",
- "when": 1755176694946,
- "tag": "0000_parallel_overlord",
+ "when": 1755189001309,
+ "tag": "0000_bitter_xorn",
"breakpoints": true
}
]