Skip to content

Commit

Permalink
Add migration script
Browse files Browse the repository at this point in the history
  • Loading branch information
PabloGracia committed Nov 7, 2024
1 parent c0790d5 commit f13107e
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
alter table "public"."help_requests" add column "asignees_count" smallint not null default '0'::smallint;
alter table "public"."help_requests" add column "asignees_count" smallint not null default '0'::smallint;

UPDATE "public"."help_requests"
SET "assignees_count" = (
SELECT COUNT(*)
FROM "public"."help_request_assignments"
WHERE "public"."help_request_assignments"."help_request_id" = "public"."help_requests"."id"
);

0 comments on commit f13107e

Please sign in to comment.