2022-08-16 03:42:25 +02:00
|
|
|
CREATE TABLE client (
|
2022-09-22 07:02:38 +02:00
|
|
|
clientid varchar(36) NOT NULL,
|
2022-08-16 03:42:25 +02:00
|
|
|
userid varchar(36) NOT NULL,
|
2022-08-27 01:21:19 +02:00
|
|
|
activesessionid varchar(36) NOT NULL,
|
2022-08-16 03:42:25 +02:00
|
|
|
userpublickeybytes blob NOT NULL,
|
2022-09-25 09:26:33 +02:00
|
|
|
userprivatekeybytes blob NOT NULL,
|
|
|
|
winsize json NOT NULL
|
2022-08-16 03:42:25 +02:00
|
|
|
);
|
|
|
|
|
2022-07-01 19:48:14 +02:00
|
|
|
CREATE TABLE session (
|
|
|
|
sessionid varchar(36) PRIMARY KEY,
|
2022-07-12 23:27:16 +02:00
|
|
|
name varchar(50) NOT NULL,
|
|
|
|
sessionidx int NOT NULL,
|
2022-07-13 06:51:17 +02:00
|
|
|
activescreenid varchar(36) NOT NULL,
|
2022-08-16 21:08:26 +02:00
|
|
|
notifynum int NOT NULL,
|
2022-08-24 22:21:54 +02:00
|
|
|
ownerid varchar(36) NOT NULL,
|
2022-08-16 21:08:26 +02:00
|
|
|
sharemode varchar(12) NOT NULL,
|
|
|
|
accesskey varchar(36) NOT NULL
|
2022-07-01 19:48:14 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
CREATE TABLE window (
|
|
|
|
sessionid varchar(36) NOT NULL,
|
|
|
|
windowid varchar(36) NOT NULL,
|
2022-08-24 22:21:54 +02:00
|
|
|
curremoteownerid varchar(36) NOT NULL,
|
2022-08-24 11:14:16 +02:00
|
|
|
curremoteid varchar(36) NOT NULL,
|
|
|
|
curremotename varchar(50) NOT NULL,
|
2022-09-21 02:01:25 +02:00
|
|
|
nextlinenum int NOT NULL,
|
2022-07-12 23:27:16 +02:00
|
|
|
winopts json NOT NULL,
|
2022-08-24 22:21:54 +02:00
|
|
|
ownerid varchar(36) NOT NULL,
|
2022-08-16 21:08:26 +02:00
|
|
|
sharemode varchar(12) NOT NULL,
|
|
|
|
shareopts json NOT NULL,
|
2022-07-01 19:48:14 +02:00
|
|
|
PRIMARY KEY (sessionid, windowid)
|
|
|
|
);
|
|
|
|
|
2022-07-12 23:27:16 +02:00
|
|
|
CREATE TABLE screen (
|
|
|
|
sessionid varchar(36) NOT NULL,
|
|
|
|
screenid varchar(36) NOT NULL,
|
|
|
|
name varchar(50) NOT NULL,
|
2022-07-13 06:51:17 +02:00
|
|
|
activewindowid varchar(36) NOT NULL,
|
2022-07-12 23:27:16 +02:00
|
|
|
screenidx int NOT NULL,
|
2022-07-13 06:51:17 +02:00
|
|
|
screenopts json NOT NULL,
|
2022-08-24 22:21:54 +02:00
|
|
|
ownerid varchar(36) NOT NULL,
|
2022-08-16 21:08:26 +02:00
|
|
|
sharemode varchar(12) NOT NULL,
|
2022-07-12 23:27:16 +02:00
|
|
|
PRIMARY KEY (sessionid, screenid)
|
|
|
|
);
|
|
|
|
|
|
|
|
CREATE TABLE screen_window (
|
|
|
|
sessionid varchar(36) NOT NULL,
|
|
|
|
screenid varchar(36) NOT NULL,
|
|
|
|
windowid varchar(36) NOT NULL,
|
2022-07-13 06:51:17 +02:00
|
|
|
name varchar(50) NOT NULL,
|
2022-07-12 23:27:16 +02:00
|
|
|
layout json NOT NULL,
|
2022-10-07 03:33:54 +02:00
|
|
|
selectedline int NOT NULL,
|
2022-10-11 10:11:04 +02:00
|
|
|
anchor json NOT NULL,
|
|
|
|
focustype varchar(12) NOT NULL,
|
2022-07-12 23:27:16 +02:00
|
|
|
PRIMARY KEY (sessionid, screenid, windowid)
|
|
|
|
);
|
|
|
|
|
2022-07-06 01:54:49 +02:00
|
|
|
CREATE TABLE remote_instance (
|
|
|
|
riid varchar(36) PRIMARY KEY,
|
|
|
|
name varchar(50) NOT NULL,
|
2022-07-01 19:48:14 +02:00
|
|
|
sessionid varchar(36) NOT NULL,
|
|
|
|
windowid varchar(36) NOT NULL,
|
2022-08-24 22:21:54 +02:00
|
|
|
remoteownerid varchar(36) NOT NULL,
|
2022-07-01 19:48:14 +02:00
|
|
|
remoteid varchar(36) NOT NULL,
|
2022-11-28 09:13:00 +01:00
|
|
|
festate json NOT NULL,
|
|
|
|
statebasehash varchar(36) NOT NULL,
|
|
|
|
statediffhasharr json NOT NULL
|
|
|
|
);
|
|
|
|
|
|
|
|
CREATE TABLE state_base (
|
|
|
|
basehash varchar(36) PRIMARY KEY,
|
|
|
|
ts bigint NOT NULL,
|
|
|
|
version varchar(200) NOT NULL,
|
|
|
|
data blob NOT NULL
|
|
|
|
);
|
|
|
|
|
|
|
|
CREATE TABLE state_diff (
|
|
|
|
diffhash varchar(36) PRIMARY KEY,
|
|
|
|
ts bigint NOT NULL,
|
|
|
|
basehash varchar(36) NOT NULL,
|
|
|
|
diffhasharr json NOT NULL,
|
|
|
|
data blob NOT NULL
|
2022-07-01 19:48:14 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
CREATE TABLE line (
|
|
|
|
sessionid varchar(36) NOT NULL,
|
|
|
|
windowid varchar(36) NOT NULL,
|
|
|
|
userid varchar(36) NOT NULL,
|
2022-09-21 02:01:25 +02:00
|
|
|
lineid varchar(36) NOT NULL,
|
2022-07-01 19:48:14 +02:00
|
|
|
ts bigint NOT NULL,
|
2022-09-21 02:01:25 +02:00
|
|
|
linenum int NOT NULL,
|
|
|
|
linenumtemp boolean NOT NULL,
|
2022-07-01 19:48:14 +02:00
|
|
|
linetype varchar(10) NOT NULL,
|
2022-09-21 02:01:25 +02:00
|
|
|
linelocal boolean NOT NULL,
|
2022-07-01 19:48:14 +02:00
|
|
|
text text NOT NULL,
|
|
|
|
cmdid varchar(36) NOT NULL,
|
2022-08-23 22:14:14 +02:00
|
|
|
ephemeral boolean NOT NULL,
|
2022-10-27 09:33:50 +02:00
|
|
|
contentheight int NOT NULL,
|
2022-07-01 19:48:14 +02:00
|
|
|
PRIMARY KEY (sessionid, windowid, lineid)
|
|
|
|
);
|
|
|
|
|
|
|
|
CREATE TABLE remote (
|
|
|
|
remoteid varchar(36) PRIMARY KEY,
|
2022-08-17 00:08:28 +02:00
|
|
|
physicalid varchar(36) NOT NULL,
|
2022-07-01 19:48:14 +02:00
|
|
|
remotetype varchar(10) NOT NULL,
|
2022-08-17 00:08:28 +02:00
|
|
|
remotealias varchar(50) NOT NULL,
|
|
|
|
remotecanonicalname varchar(200) NOT NULL,
|
|
|
|
remotesudo boolean NOT NULL,
|
|
|
|
remoteuser varchar(50) NOT NULL,
|
|
|
|
remotehost varchar(200) NOT NULL,
|
2022-08-21 21:31:29 +02:00
|
|
|
connectmode varchar(20) NOT NULL,
|
2022-09-25 04:54:06 +02:00
|
|
|
autoinstall boolean NOT NULL,
|
2022-07-07 22:26:46 +02:00
|
|
|
sshopts json NOT NULL,
|
2022-08-19 22:23:00 +02:00
|
|
|
remoteopts json NOT NULL,
|
2022-09-14 02:11:36 +02:00
|
|
|
lastconnectts bigint NOT NULL,
|
2022-10-04 20:45:24 +02:00
|
|
|
local boolean NOT NULL,
|
2022-09-14 21:06:55 +02:00
|
|
|
archived boolean NOT NULL,
|
|
|
|
remoteidx int NOT NULL
|
2022-07-01 19:48:14 +02:00
|
|
|
);
|
|
|
|
|
2022-07-07 09:10:37 +02:00
|
|
|
CREATE TABLE cmd (
|
2022-07-01 19:48:14 +02:00
|
|
|
sessionid varchar(36) NOT NULL,
|
|
|
|
cmdid varchar(36) NOT NULL,
|
2022-08-24 22:21:54 +02:00
|
|
|
remoteownerid varchar(36) NOT NULL,
|
2022-07-01 19:48:14 +02:00
|
|
|
remoteid varchar(36) NOT NULL,
|
2022-08-24 22:21:54 +02:00
|
|
|
remotename varchar(50) NOT NULL,
|
2022-07-07 09:10:37 +02:00
|
|
|
cmdstr text NOT NULL,
|
2022-07-06 01:54:49 +02:00
|
|
|
remotestate json NOT NULL,
|
2022-07-07 09:10:37 +02:00
|
|
|
termopts json NOT NULL,
|
2022-09-22 07:02:38 +02:00
|
|
|
origtermopts json NOT NULL,
|
2022-07-01 19:48:14 +02:00
|
|
|
status varchar(10) NOT NULL,
|
2022-07-07 09:10:37 +02:00
|
|
|
startpk json NOT NULL,
|
|
|
|
donepk json NOT NULL,
|
|
|
|
runout json NOT NULL,
|
2022-10-27 09:33:50 +02:00
|
|
|
rtnstate bool NOT NULL,
|
2022-07-01 19:48:14 +02:00
|
|
|
PRIMARY KEY (sessionid, cmdid)
|
|
|
|
);
|
|
|
|
|
|
|
|
CREATE TABLE history (
|
2022-08-11 21:07:41 +02:00
|
|
|
historyid varchar(36) PRIMARY KEY,
|
|
|
|
ts bigint NOT NULL,
|
|
|
|
userid varchar(36) NOT NULL,
|
2022-07-01 19:48:14 +02:00
|
|
|
sessionid varchar(36) NOT NULL,
|
2022-08-11 21:07:41 +02:00
|
|
|
screenid varchar(36) NOT NULL,
|
2022-07-01 19:48:14 +02:00
|
|
|
windowid varchar(36) NOT NULL,
|
2022-08-11 21:07:41 +02:00
|
|
|
lineid int NOT NULL,
|
2022-08-28 23:24:05 +02:00
|
|
|
remoteownerid varchar(36) NOT NULL,
|
|
|
|
remoteid varchar(36) NOT NULL,
|
|
|
|
remotename varchar(50) NOT NULL,
|
2022-08-12 08:45:15 +02:00
|
|
|
haderror boolean NOT NULL,
|
2022-08-11 21:07:41 +02:00
|
|
|
cmdid varchar(36) NOT NULL,
|
2022-08-28 23:24:05 +02:00
|
|
|
cmdstr text NOT NULL,
|
|
|
|
ismetacmd boolean
|
2022-07-01 19:48:14 +02:00
|
|
|
);
|