Skip to content

Commit

Permalink
BE: fix V2__Add_side_to_arguments migration to handle incomplete data
Browse files Browse the repository at this point in the history
  • Loading branch information
venetrius committed Feb 17, 2024
1 parent 3910fff commit b468fe9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/resources/db/migration/V2__Add_side_to_arguments.sql
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,8 @@ SET side = (
AND ud.user_id = arguments.author_id
);

UPDATE arguments
SET side = 'PRO'
WHERE side is null;

ALTER TABLE arguments ALTER COLUMN side SET NOT NULL;

0 comments on commit b468fe9

Please sign in to comment.