forked from nerves-hub/nerves_hub_web
-
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.
Change jitp>product relation to has_many
Actual relation between jitp and product is has_one. There is no valid reason for limiting JITP enabled certificate to one per product. This commit: * updates Ecto schema * adds migration to remove unique_index on jitp.product_id Fixes nerves-hub#871
- Loading branch information
Jean Parpaillon
committed
Dec 21, 2022
1 parent
c28b9bd
commit 6b8c55b
Showing
2 changed files
with
8 additions
and
1 deletion.
There are no files selected for viewing
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
7 changes: 7 additions & 0 deletions
7
...erves_hub_web_core/priv/repo/migrations/20221220101029_remove_jitp_product_uniqueness.exs
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,7 @@ | ||
defmodule NervesHubWebCore.Repo.Migrations.RemoveJitpProductUniqueness do | ||
use Ecto.Migration | ||
|
||
def change do | ||
drop unique_index(:jitp, [:product_id]) | ||
end | ||
end |