Diffstat (limited to 'backend/node/src/clipperz.schema.sql') (more/less context) (ignore whitespace changes)
-rw-r--r-- | backend/node/src/clipperz.schema.sql | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/backend/node/src/clipperz.schema.sql b/backend/node/src/clipperz.schema.sql index ba6f482..1c2305c 100644 --- a/backend/node/src/clipperz.schema.sql +++ b/backend/node/src/clipperz.schema.sql @@ -29,32 +29,39 @@ CREATE TABLE clipperz.therecordversion ( r_id integer NOT NULL REFERENCES clipperz.therecord (r_id) ON UPDATE CASCADE ON DELETE CASCADE, rv_ref varchar NOT NULL UNIQUE, rv_header varchar, rv_data varchar NOT NULL, rv_version varchar NOT NULL, rv_previous_key varchar NOT NULL, rv_previous_id varchar, rv_ctime timestamp NOT NULL DEFAULT current_timestamp, rv_mtime timestamp NOT NULL DEFAULT current_timestamp, rv_atime timestamp NOT NULL DEFAULT current_timestamp ); CREATE TABLE clipperz.otpstatus ( otps_id serial PRIMARY KEY, otps_code varchar NOT NULL, otps_name varchar NOT NULL, otps_desc varchar NOT NULL ); CREATE TABLE clipperz.theotp ( otp_id serial PRIMARY KEY, u_id integer REFERENCES clipperz.theuser (u_id) ON UPDATE CASCADE ON DELETE CASCADE, otps_id integer REFERENCES clipperz.otpstatus (otps_id) ON UPDATE CASCADE ON DELETE CASCADE, otp_ref varchar NOT NULL UNIQUE, otp_key varchar NOT NULL UNIQUE, otp_key_checksum varchar NOT NULL, otp_data varchar NOT NULL, otp_version varchar NOT NULL, otp_ctime timestamp NOT NULL DEFAULT current_timestamp, otp_rtime timestamp NOT NULL DEFAULT current_timestamp, otp_utime timestamp NOT NULL DEFAULT current_timestamp ); + +CREATE TABLE clipperz.thesession ( + s_id varchar PRIMARY KEY, + s_data json, + s_ctime timestamp DEFAULT current_timestamp, + s_mtime timestamp DEFAULT current_timestamp +); |