You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: 20190731203856_migrate_absence_justifications_students.rb
    path of file: ./repos/i-diario/db/migrate
    
    the code of the file until where you have to start completion: class MigrateAbsenceJustificationsStudents < ActiveRecord::Migration[4.2]
  def change
    execute <<-SQL
      DO $$DECLARE
        absence_justification RECORD;
      BEG
    
  def change
    execute <<-SQL
      DO $$DECLARE
        absence_justification RECORD;
      BEGIN
        FOR absence_justification IN (
          SELECT id, student_id
            FROM absence_justifications
        ) LOOP
          INSERT
            INTO absence_justifications_students (
              absence_justification_id,
              student_id
            )
          VALUES (
            absence_justification.id,
            absence_justification.student_id
          );
        END LOOP;
      END$$
    SQL
  end