text: -- This script was generated by the Schema Diff utility in pgAdmin 4
  -- For the circular dependencies, the order in which Schema Diff writes the objects is not very sophisticated
  -- and may require manual changes to the script to ensure changes are applied in the correct order.
  -- Please report an issue for any failure with the reproduction steps.
  
  ALTER TABLE IF EXISTS public.topics DROP CONSTRAINT IF EXISTS topics_course_fkey;
  
  ALTER TABLE IF EXISTS public.topics
      ADD CONSTRAINT topics_course_fkey FOREIGN KEY (course)
      REFERENCES public.courses (id) MATCH SIMPLE
      ON UPDATE NO ACTION
      ON DELETE CASCADE;