Add ctime/mtime to payment_variant

This commit is contained in:
2023-07-18 16:47:05 +02:00
parent 7e6e0c0fca
commit d5bacb65ea
3 changed files with 75 additions and 2 deletions

View File

@ -612,6 +612,7 @@ CREATE TABLE payment_variant (
name TEXT NOT NULL,
date TEXT NOT NULL CHECK (date REGEXP '^[1-9][0-9]{3}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$') DEFAULT CURRENT_DATE,
test_variant INTEGER NOT NULL CHECK (test_variant IN (TRUE, FALSE)),
calc_time INTEGER,
bucket_1_name TEXT DEFAULT NULL,
bucket_2_name TEXT DEFAULT NULL,
@ -625,6 +626,8 @@ CREATE TABLE payment_variant (
comment TEXT DEFAULT NULL,
data TEXT NOT NULL,
ctime INTEGER NOT NULL DEFAULT (UNIXEPOCH()),
mtime INTEGER NOT NULL DEFAULT (UNIXEPOCH()),
CONSTRAINT pk_payment PRIMARY KEY (year, avnr)
) STRICT;