Create EE only service GitlabSubscriptions::Members::ActivityService

What does this MR do and why?

This MR adds a new EE only service: GitlabSubscriptions::Members::ActivityService.

This will be used to track members related activity.

Related to #461338 (closed)

Databases

  1. Getting single record, if exists
SELECT 1 AS one FROM "subscription_seat_assignments" WHERE "subscription_seat_assignments"."namespace_id" = 411 AND "subscription_seat_assignments"."user_id" = 109 LIMIT 1

PostgresAI: https://console.postgres.ai/gitlab/gitlab-production-main/sessions/31879/commands/98599

  1. Creating a new record
INSERT INTO "subscription_seat_assignments" ("namespace_id", "user_id", "last_activity_on", "created_at", "updated_at") VALUES (411, 109, '2024-09-25 09:40:09.054561', '2024-09-25 09:40:09.057704', '2024-09-25 09:40:09.057704') RETURNING "id"

PostgresAI: https://console.postgres.ai/gitlab/gitlab-production-main/sessions/31879/commands/98602

  1. Updating a record
UPDATE "subscription_seat_assignments" SET "last_activity_on" = '2024-09-25 09:43:05.804959', "updated_at" = '2024-09-25 09:43:05.831099' WHERE "subscription_seat_assignments"."id" = 2

PostgresAI: https://console.postgres.ai/gitlab/gitlab-production-main/sessions/31879/commands/98601

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Bishwa Hang Rai

Merge request reports

Loading