mirror of
https://github.com/3ybactuk/marketplace-go-service-project.git
synced 2026-11-04 00:02:52 +03:00
[hw-8] add: repo layer
This commit is contained in:
1 parent
c1e8934646
commit
6420eaf3d7
25 files changed
+4194
-6
No files matched your search
@@ -0,0 +1,10 @@
|
||||
CREATE TABLE comments (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
user_id BIGINT NOT NULL,
|
||||
sku BIGINT NOT NULL,
|
||||
text VARCHAR(255) NOT NULL,
|
||||
created_at TIMESTAMP(3) NOT NULL DEFAULT now()
|
||||
);
|
||||
|
||||
CREATE INDEX ON comments(sku, created_at DESC, user_id ASC);
|
||||
CREATE INDEX ON comments(user_id, created_at DESC);
|
||||
Reference in new issue
Block a user