new bookmark tables

This commit is contained in:
sawka 2023-02-20 15:42:27 -08:00
parent d0b03c359a
commit 37ffcd03c8
3 changed files with 44 additions and 1 deletions

View File

@ -0,0 +1,3 @@
DROP TABLE bookmark;
DROP TABLE bookmark_order;
DROP TABLE bookmark_cmd;

View File

@ -0,0 +1,21 @@
CREATE TABLE bookmark (
bookmarkid varchar(36) PRIMARY KEY,
createdts bigint NOT NULL,
cmdstr text NOT NULL,
alias varchar(50) NOT NULL,
tags json NOT NULL,
description text NOT NULL
);
CREATE TABLE bookmark_order (
tag varchar(50) NOT NULL,
bookmarkid varchar(36) NOT NULL,
orderidx int NOT NULL,
PRIMARY KEY (tag, bookmarkid)
);
CREATE TABLE bookmark_cmd (
bookmarkid varchar(36) NOT NULL,
cmdid varchar(36) NOT NULL,
PRIMARY KEY (bookmarkid, cmdid)
);

View File

@ -97,7 +97,7 @@ CREATE TABLE line (
ephemeral boolean NOT NULL,
contentheight int NOT NULL,
star int NOT NULL,
archived boolean NOT NULL,
archived boolean NOT NULL, renderer varchar(50) NOT NULL DEFAULT '',
PRIMARY KEY (sessionid, windowid, lineid)
);
CREATE TABLE remote (
@ -165,3 +165,22 @@ CREATE TABLE activity (
clientversion varchar(20) NOT NULL,
clientarch varchar(20) NOT NULL
);
CREATE TABLE bookmark (
bookmarkid varchar(36) PRIMARY KEY,
createdts bigint NOT NULL,
cmdstr text NOT NULL,
alias varchar(50) NOT NULL,
tags json NOT NULL,
description text NOT NULL
);
CREATE TABLE bookmark_order (
tag varchar(50) NOT NULL,
bookmarkid varchar(36) NOT NULL,
orderidx int NOT NULL,
PRIMARY KEY (tag, bookmarkid)
);
CREATE TABLE bookmark_cmd (
bookmarkid varchar(36) NOT NULL,
cmdid varchar(36) NOT NULL,
PRIMARY KEY (bookmarkid, cmdid)
);