1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
| CREATE TABLE IF NOT EXISTS wl_comment ( id SERIAL PRIMARY KEY, user_id int DEFAULT NULL, comment text, insertedAt timestamp(0) without time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, ip varchar(100) DEFAULT '', link text DEFAULT NULL, mail text DEFAULT NULL, nick text DEFAULT NULL, pid int DEFAULT NULL, rid int DEFAULT NULL, sticky numeric DEFAULT NULL, status varchar(50) NOT NULL DEFAULT '', "like" int DEFAULT NULL, ua text, url text DEFAULT NULL, createdAt timestamp(0) without time zone NULL DEFAULT CURRENT_TIMESTAMP, updatedAt timestamp(0) without time zone NULL DEFAULT CURRENT_TIMESTAMP );
CREATE TABLE IF NOT EXISTS wl_counter ( id SERIAL PRIMARY KEY, time int DEFAULT NULL, reaction0 int DEFAULT NULL, reaction1 int DEFAULT NULL, reaction2 int DEFAULT NULL, reaction3 int DEFAULT NULL, reaction4 int DEFAULT NULL, reaction5 int DEFAULT NULL, reaction6 int DEFAULT NULL, reaction7 int DEFAULT NULL, reaction8 int DEFAULT NULL, url text NOT NULL DEFAULT '', createdAt timestamp(0) without time zone NULL DEFAULT CURRENT_TIMESTAMP, updatedAt timestamp(0) without time zone NULL DEFAULT CURRENT_TIMESTAMP );
CREATE TABLE IF NOT EXISTS wl_users ( id SERIAL PRIMARY KEY, display_name text NOT NULL DEFAULT '', email text NOT NULL DEFAULT '', password text NOT NULL DEFAULT '', type varchar(50) NOT NULL DEFAULT '', label text DEFAULT NULL, url text DEFAULT NULL, avatar text DEFAULT NULL, github text DEFAULT NULL, twitter text DEFAULT NULL, facebook text DEFAULT NULL, google text DEFAULT NULL, weibo text DEFAULT NULL, qq text DEFAULT NULL, oidc text DEFAULT NULL, huawei text DEFAULT NULL, "2fa" varchar(32) DEFAULT NULL, createdAt timestamp(0) without time zone NULL DEFAULT CURRENT_TIMESTAMP, updatedAt timestamp(0) without time zone NULL DEFAULT CURRENT_TIMESTAMP );
|