From aef0b00fb9c2236bbc3fa85e486e2b44cba494d3 Mon Sep 17 00:00:00 2001
From: Julien Dessaux
Date: Sun, 12 Jan 2025 00:15:52 +0100
Subject: feat(tfstated): store created and updated timestamps for states

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

(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 e14142b..0bcdee1 100644
--- a/pkg/database/sql/000_init.sql
+++ b/pkg/database/sql/000_init.sql
@@ -26,7 +26,9 @@ CREATE TABLE sessions (
 CREATE TABLE states (
   id INTEGER PRIMARY KEY,
   path TEXT NOT NULL,
-  lock TEXT
+  lock TEXT,
+  created INTEGER DEFAULT (unixepoch()),
+  updated INTEGER DEFAULT (unixepoch())
 ) STRICT;
 CREATE UNIQUE INDEX states_path on states(path);
 
-- 
cgit v1.2.3

