Skip to content

Commit

Permalink
Merge pull request #21 from Serveis-Neby/task/180-fix-achievements-no…
Browse files Browse the repository at this point in the history
…tifications-table-db

task #180: fix achievements notifications table db
  • Loading branch information
leobelab authored May 31, 2024
2 parents 913353a + dd740ce commit 720a32a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions data.sql
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@ CREATE TABLE
status notification_services_status DEFAULT 'pending',
notification_id UUID REFERENCES notifications (id) ON DELETE CASCADE
);

CREATE TABLE
IF NOT EXISTS notifications_achievements (
id UUID PRIMARY KEY DEFAULT uuid_generate_v4 (),
achievement_user_id UUID REFERENCES notifications (id) ON DELETE CASCADE
achievement_user_id UUID REFERENCES user_achievements (id) ON DELETE CASCADE,
notification_id UUID REFERENCES notifications (id) ON DELETE CASCADE
);


CREATE OR REPLACE FUNCTION update_updated_at_column()
RETURNS TRIGGER AS $$
BEGIN
Expand Down Expand Up @@ -169,4 +169,4 @@ VALUES
'Community Cohesion: Engage in 5 Vibrant Service Interactions',
'get 5 services accepted. ',
100
);
);

0 comments on commit 720a32a

Please sign in to comment.