Skip to content

Commit

Permalink
fix: correct migration for audit action
Browse files Browse the repository at this point in the history
  • Loading branch information
tronghn committed Aug 16, 2024
1 parent 6eacce6 commit c311225
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions internal/database/migrations/0017_update_audit_events_actions.sql
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';

0 comments on commit c311225

Please sign in to comment.