Add an API that returns the most active users and the projects where they've been active
This commit is contained in:
parent
bc3287e5d0
commit
44160869eb
7 changed files with 376 additions and 43 deletions
|
@ -0,0 +1,9 @@
|
|||
CREATE TABLE IF NOT EXISTS "project_activity_periods" (
|
||||
"id" SERIAL PRIMARY KEY,
|
||||
"duration_millis" INTEGER NOT NULL,
|
||||
"ended_at" TIMESTAMP NOT NULL,
|
||||
"user_id" INTEGER REFERENCES users (id) NOT NULL,
|
||||
"project_id" INTEGER
|
||||
);
|
||||
|
||||
CREATE INDEX "index_project_activity_periods_on_ended_at" ON "project_activity_periods" ("ended_at");
|
Loading…
Add table
Add a link
Reference in a new issue