From ab548d249b56988823cc91fa46ad7bfff0d75250 Mon Sep 17 00:00:00 2001
From: Julien Dessaux
Date: Fri, 31 Jan 2025 20:53:29 +0100
Subject: chore(tfstated): change database account id format to uuidv7

---
 pkg/database/sql/000_init.sql | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'pkg/database/sql/000_init.sql')

diff --git a/pkg/database/sql/000_init.sql b/pkg/database/sql/000_init.sql
index 80e8c8c..3530e52 100644
--- a/pkg/database/sql/000_init.sql
+++ b/pkg/database/sql/000_init.sql
@@ -3,7 +3,7 @@ CREATE TABLE schema_version (
 ) STRICT;
 
 CREATE TABLE accounts (
-  id INTEGER PRIMARY KEY,
+  id TEXT PRIMARY KEY,
   username TEXT NOT NULL,
   salt BLOB NOT NULL,
   password_hash BLOB NOT NULL,
@@ -16,7 +16,7 @@ CREATE UNIQUE INDEX accounts_username on accounts(username);
 
 CREATE TABLE sessions (
   id TEXT PRIMARY KEY,
-  account_id INTEGER NOT NULL,
+  account_id TEXT NOT NULL,
   created INTEGER NOT NULL DEFAULT (unixepoch()),
   updated INTEGER NOT NULL DEFAULT (unixepoch()),
   data TEXT NOT NULL,
@@ -34,7 +34,7 @@ CREATE UNIQUE INDEX states_path on states(path);
 
 CREATE TABLE versions (
   id INTEGER PRIMARY KEY,
-  account_id INTEGER NOT NULL,
+  account_id TEXT NOT NULL,
   state_id INTEGER,
   data BLOB,
   lock TEXT,
-- 
cgit v1.2.3

