Skip to content

Commit

Permalink
Adds validating of notes foreign key
Browse files Browse the repository at this point in the history
Adds migration for validation foreign key in notes table referencing users table.
  • Loading branch information
nenad-vujicic committed Jan 17, 2025
1 parent 3eccf65 commit fa6a828
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions db/migrate/20250105154621_validate_foreign_key_on_notes.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class ValidateForeignKeyOnNotes < ActiveRecord::Migration[7.2]
def change
validate_foreign_key :notes, :users
end
end

0 comments on commit fa6a828

Please sign in to comment.