Skip to content

Commit

Permalink
Add migration to enforce user_id on preferences
Browse files Browse the repository at this point in the history
  • Loading branch information
abshierjoel committed Oct 4, 2021
1 parent 0be09ba commit 33d771b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions priv/repo/migrations/20211004004848_require_user_id.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
defmodule UserPreferences.Repo.Migrations.RequireUserId do
use Ecto.Migration

def change do
alter table(:preferences) do
modify :user_id, :integer, null: false
end
end
end

0 comments on commit 33d771b

Please sign in to comment.