summaryrefslogtreecommitdiff
path: root/pkg/database/sql
diff options
context:
space:
mode:
authorJulien Dessaux2025-01-12 00:15:52 +0100
committerJulien Dessaux2025-01-12 00:15:52 +0100
commitaef0b00fb9c2236bbc3fa85e486e2b44cba494d3 (patch)
treea40dfe2ae1f71eed6dcb1f0bc8b94428d1b1b770 /pkg/database/sql
parentchore(tfstated): fix test and update dependencies (diff)
downloadtfstated-aef0b00fb9c2236bbc3fa85e486e2b44cba494d3.tar.gz
tfstated-aef0b00fb9c2236bbc3fa85e486e2b44cba494d3.tar.bz2
tfstated-aef0b00fb9c2236bbc3fa85e486e2b44cba494d3.zip
feat(tfstated): store created and updated timestamps for states
Diffstat (limited to 'pkg/database/sql')
-rw-r--r--pkg/database/sql/000_init.sql4
1 files changed, 3 insertions, 1 deletions
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);