-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: correct migration for audit action
- Loading branch information
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
internal/database/migrations/0017_update_audit_events_actions.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
-- +goose Up | ||
|
||
UPDATE audit_events | ||
SET action = 'ADDED' | ||
WHERE | ||
action = 'TEAM_MEMBER_ADDED' | ||
AND resource_type = 'TEAM_MEMBER'; | ||
|
||
UPDATE audit_events | ||
SET action = 'REMOVED' | ||
WHERE | ||
action = 'TEAM_MEMBER_REMOVED' | ||
AND resource_type = 'TEAM_MEMBER'; | ||
|
||
-- +goose Down | ||
|
||
UPDATE audit_events | ||
SET action = 'TEAM_MEMBER_ADDED' | ||
WHERE | ||
action = 'ADDED' | ||
AND resource_type = 'TEAM_MEMBER'; | ||
|
||
UPDATE audit_events | ||
SET action = 'TEAM_MEMBER_REMOVED' | ||
WHERE | ||
action = 'REMOVED' | ||
AND resource_type = 'TEAM_MEMBER'; |