Skip to content

Commit

Permalink
Implement tracking install and reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
james03160927 committed Jun 1, 2024
1 parent 5224d14 commit 48c6986
Show file tree
Hide file tree
Showing 38 changed files with 5,724 additions and 367 deletions.
247 changes: 178 additions & 69 deletions drip/api.gen.go

Large diffs are not rendered by default.

223 changes: 215 additions & 8 deletions ent/client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions ent/ent.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions ent/hook/hook.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions ent/migrate/migrations/20240601211932_migration.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
-- Modify "nodes" table
ALTER TABLE "nodes" ADD COLUMN "total_install" bigint NOT NULL DEFAULT 0, ADD COLUMN "total_star" bigint NOT NULL DEFAULT 0, ADD COLUMN "total_review" bigint NOT NULL DEFAULT 0;
-- Create "node_reviews" table
CREATE TABLE "node_reviews" ("id" uuid NOT NULL, "star" bigint NOT NULL DEFAULT 0, "node_id" text NOT NULL, "user_id" character varying NOT NULL, PRIMARY KEY ("id"), CONSTRAINT "node_reviews_nodes_reviews" FOREIGN KEY ("node_id") REFERENCES "nodes" ("id") ON UPDATE NO ACTION ON DELETE NO ACTION, CONSTRAINT "node_reviews_users_reviews" FOREIGN KEY ("user_id") REFERENCES "users" ("id") ON UPDATE NO ACTION ON DELETE NO ACTION);
-- Create index "nodereview_node_id_user_id" to table: "node_reviews"
CREATE UNIQUE INDEX "nodereview_node_id_user_id" ON "node_reviews" ("node_id", "user_id");
3 changes: 2 additions & 1 deletion ent/migrate/migrations/atlas.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
h1:6oztoFVRk9lR+3VkK/QRBH0aWj6Q3oyKkUlQkrLcJYs=
h1:9EV71nxYeG+28BC8qftpzSYZzD+yHZeVSvxkILgTXLQ=
20240526144817_migration.sql h1:sP6keX+oMyLL2qpIFx0Ns0WYfWM5hJ4zkFPmLWT68fM=
20240528220411_migration.sql h1:SR44sOEaWbDgYCKJZIKcGCI7Ta+LqL71z225Nhs2+HM=
20240528221846_migration.sql h1:EkUonGI9Bu689qWX4pG3PRC+On4f6u7UvwDbaR8mCNk=
20240528222851_migration.sql h1:VaQhEaDGe8M2kuNtKVjuMWMLJ9RhJVraVgSM4rm/XcQ=
20240601211932_migration.sql h1:zTofjRbLfoZZF8k6dvAMUDJGRENHAG3m1qqtLgTXUCQ=
Loading

0 comments on commit 48c6986

Please sign in to comment.