mirror of https://github.com/rocboss/paopao-ce
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
574 B
18 lines
574 B
2 years ago
|
CREATE TABLE p_tag (
|
||
|
id bigserial PRIMARY KEY,
|
||
|
user_id bigserial NOT NULL DEFAULT 0,
|
||
|
tag varchar(255) NOT NULL,
|
||
|
quote_num bigint NOT NULL DEFAULT 0,
|
||
|
created_on int NOT NULL DEFAULT 0,
|
||
|
modified_on int NOT NULL DEFAULT 0,
|
||
|
deleted_on int NOT NULL DEFAULT 0,
|
||
|
is_del boolean NOT NULL DEFAULT false,
|
||
|
UNIQUE (tag)
|
||
|
);
|
||
|
COMMENT ON TABLE p_tag IS '主题标签';
|
||
|
COMMENT ON COLUMN p_tag.is_del IS '是否删除';
|
||
|
CREATE UNIQUE INDEX p_tag_tag_idx ON p_tag (tag);
|
||
|
CREATE INDEX p_tag_user_idx ON p_tag (user_id);
|
||
|
CREATE INDEX p_tag_quote_num_idx On p_tag (quote_num);
|
||
|
|