Adds migration for validation foreign key in notes table referencing users table.
--- /dev/null
+class ValidateForeignKeyOnNotes < ActiveRecord::Migration[7.2]
+ def change
+ validate_foreign_key :notes, :users
+ end
+end
--
ALTER TABLE ONLY public.notes
- ADD CONSTRAINT notes_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) NOT VALID;
+ ADD CONSTRAINT notes_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id);
--
('23'),
('22'),
('21'),
+('20250105154621'),
('20250104140952'),
('20241023004427'),
('20241022141247'),