Added some database indices
This commit is contained in:
parent
50a853d2ba
commit
03df15818e
@ -19,6 +19,8 @@ CREATE TABLE booru.image
|
||||
CONSTRAINT uploader FOREIGN KEY (uploader) REFERENCES booru.member (id)
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX image_pk_index ON booru.image(id);
|
||||
|
||||
CREATE TABLE booru.role
|
||||
(
|
||||
id bigserial NOT NULL PRIMARY KEY,
|
||||
@ -32,6 +34,8 @@ CREATE TABLE booru.tag
|
||||
amount bigint NOT NULL
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX tag_pk_index ON booru.tag(id);
|
||||
|
||||
CREATE TABLE booru.tag_image
|
||||
(
|
||||
tag_id bigint NOT NULL,
|
||||
@ -41,6 +45,9 @@ CREATE TABLE booru.tag_image
|
||||
CONSTRAINT tag FOREIGN KEY (tag_id) REFERENCES booru.tag (id)
|
||||
);
|
||||
|
||||
CREATE INDEX ti_image_index ON booru.tag_image(image_id);
|
||||
CREATE INDEX ti_tag_index ON booru.tag_image(tag_id);
|
||||
|
||||
CREATE TABLE booru.member_roles
|
||||
(
|
||||
member_id bigint NOT NULL,
|
||||
|
Loading…
Reference in New Issue
Block a user