Skip to content

Commit

Permalink
feat(ex/notifications): add corrisponding detour notifications to not…
Browse files Browse the repository at this point in the history
…fications table
  • Loading branch information
firestack committed Sep 19, 2024
1 parent 92c3368 commit d679f48
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/notifications/db/notification.ex
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ defmodule Notifications.Db.Notification do

belongs_to(:block_waiver, DbBlockWaiver)
belongs_to(:bridge_movement, DbBridgeMovement)
belongs_to(:detour, Notifications.Db.Detour)
end

def block_waiver_changeset(notification, attrs \\ %{}) do
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
defmodule Skate.Repo.Migrations.CreateDetourNotificationsReference do
use Ecto.Migration

def change do
alter table(:notifications) do
add(:detour_id, references(:detour_notifications))
end
end
end

0 comments on commit d679f48

Please sign in to comment.