Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
CREATE TABLE user_monthly_stat (
id BIGSERIAL PRIMARY KEY,
user_id BIGINT NOT NULL,
year INT NOT NULL,
month INT NOT NULL,
record_count INT NOT NULL DEFAULT 0,
CONSTRAINT uq_user_monthly_stat UNIQUE (user_id, year, month),
CONSTRAINT fk_user_monthly_stat_user FOREIGN KEY (user_id)
REFERENCES users(id)
);
Loading