-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
feat(dashboards): Add model for storing visit information #95361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Adds a model that will be created for a singular visit by a user to a particular dashboard. This is to move us away from a generic global "last visited" timestamp on dashboards and something more focused on the user themselves.
This PR has a migration; here is the generated SQL for for --
-- Create model DashboardLastVisited
--
CREATE TABLE "sentry_dashboardlastvisited" ("id" bigint NOT NULL PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, "date_updated" timestamp with time zone NOT NULL, "date_added" timestamp with time zone NOT NULL, "last_visited" timestamp with time zone NOT NULL, "dashboard_id" bigint NOT NULL, "member_id" bigint NOT NULL, CONSTRAINT "sentry_dashboardlastvisited_unique_last_visited_per_org_member_view" UNIQUE ("member_id", "dashboard_id"));
ALTER TABLE "sentry_dashboardlastvisited" ADD CONSTRAINT "sentry_dashboardlast_dashboard_id_31d3a51b_fk_sentry_da" FOREIGN KEY ("dashboard_id") REFERENCES "sentry_dashboard" ("id") DEFERRABLE INITIALLY DEFERRED NOT VALID;
ALTER TABLE "sentry_dashboardlastvisited" VALIDATE CONSTRAINT "sentry_dashboardlast_dashboard_id_31d3a51b_fk_sentry_da";
ALTER TABLE "sentry_dashboardlastvisited" ADD CONSTRAINT "sentry_dashboardlast_member_id_28801a0a_fk_sentry_or" FOREIGN KEY ("member_id") REFERENCES "sentry_organizationmember" ("id") DEFERRABLE INITIALLY DEFERRED NOT VALID;
ALTER TABLE "sentry_dashboardlastvisited" VALIDATE CONSTRAINT "sentry_dashboardlast_member_id_28801a0a_fk_sentry_or";
CREATE INDEX CONCURRENTLY "sentry_dashboardlastvisited_dashboard_id_31d3a51b" ON "sentry_dashboardlastvisited" ("dashboard_id");
CREATE INDEX CONCURRENTLY "sentry_dashboardlastvisited_member_id_28801a0a" ON "sentry_dashboardlastvisited" ("member_id"); |
❌ 2 Tests Failed:
View the top 2 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Schema changes look good to me.
Adds a model that will be created for a singular visit by a user to a particular dashboard. This is to move us away from a generic global "last visited" timestamp on dashboards and something more focused on the user themselves.
Closes DAIN-731