From: Nicolas Boisselier Date: Tue, 5 Jun 2018 15:22:12 +0000 (+0100) Subject: lib/postgres/link.sql X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=9f0a5c274edf77946cdb9a6c56051e2dbe87beab;p=nb.git lib/postgres/link.sql --- diff --git a/lib/postgres/link.sql b/lib/postgres/link.sql new file mode 100644 index 00000000..0feeafd1 --- /dev/null +++ b/lib/postgres/link.sql @@ -0,0 +1,10 @@ +DROP TABLE IF EXISTS link; +CREATE TABLE IF NOT EXISTS link ( + link VARCHAR(500) PRIMARY KEY, + title VARCHAR(250) NOT NULL, + laius VARCHAR(250) NOT NULL, + created TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + enable BOOLEAN DEFAULT 'f' +); + +CREATE INDEX IF NOT EXISTS link_created ON link USING btree (created);