From e359b036c39f954ff0712a3d48175b8b89491d6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=9E=E7=A9=BA?= Date: Tue, 14 Mar 2017 00:28:01 +0800 Subject: [PATCH] add forums tables --- sqlscript/forums/topic.sql | 20 ++++++++++++++++++++ sqlscript/forums/topicNode.sql | 14 ++++++++++++++ sqlscript/forums/topicReply.sql | 13 +++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 sqlscript/forums/topic.sql create mode 100644 sqlscript/forums/topicNode.sql create mode 100644 sqlscript/forums/topicReply.sql diff --git a/sqlscript/forums/topic.sql b/sqlscript/forums/topic.sql new file mode 100644 index 0000000..8fcc875 --- /dev/null +++ b/sqlscript/forums/topic.sql @@ -0,0 +1,20 @@ +DROP TABLE IF EXISTS forums.topic; +CREATE TABLE forums.topic +( + sysid uuid, + nodeId uuid, + userId uuid, + email character varying, + title character varying, + content character varying, + "top" int DEFAULT 0, + good boolean DEFAULT false, + viewCount int DEFAULT 0, + replyCount int DEFAULT 0, + lastReplyUserId uuid, + lastReplyTime timestamp with time zone DEFAULT CURRENT_TIMESTAMP, + createdon timestamp with time zone DEFAULT CURRENT_TIMESTAMP, + deletedon timestamp with time zone DEFAULT CURRENT_TIMESTAMP, + "status" int DEFAULT 0, + PRIMARY KEY (sysid) +); \ No newline at end of file diff --git a/sqlscript/forums/topicNode.sql b/sqlscript/forums/topicNode.sql new file mode 100644 index 0000000..de3ca4c --- /dev/null +++ b/sqlscript/forums/topicNode.sql @@ -0,0 +1,14 @@ +DROP TABLE IF EXISTS forums.topicNode; +CREATE TABLE forums.topicNode +( + sysid uuid, + parentId uuid, + nodeName character varying, + "name" character varying, + "description" character varying, + "order" int DEFAULT 0, + createdon timestamp with time zone DEFAULT CURRENT_TIMESTAMP, + deletedon timestamp with time zone DEFAULT CURRENT_TIMESTAMP, + "status" int DEFAULT 0, + PRIMARY KEY (sysid) +); \ No newline at end of file diff --git a/sqlscript/forums/topicReply.sql b/sqlscript/forums/topicReply.sql new file mode 100644 index 0000000..18728c5 --- /dev/null +++ b/sqlscript/forums/topicReply.sql @@ -0,0 +1,13 @@ +DROP TABLE IF EXISTS forums.topicReply; +CREATE TABLE forums.topicReply +( + sysid uuid, + topicId uuid, + userId uuid, + replyEmail character varying, + replyContent character varying, + createdon timestamp with time zone DEFAULT CURRENT_TIMESTAMP, + deletedon timestamp with time zone DEFAULT CURRENT_TIMESTAMP, + "status" int DEFAULT 0, + PRIMARY KEY (sysid) +); \ No newline at end of file