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: 110_create_assignment_questionnaires.rb
    path of file: ./repos/expertiza/db/migrate
    
    the code of the file until where you have to start completion: class CreateAssignmentQuestionnaires < ActiveRecord::Migration[4.2]
  def self.up
    begin
      drop_table :assignments_questionnaires
    rescue StandardError
    end
    create_table :assignment_questionnaires do |t|
      t.column :assignment_id,        :integer, null: true
      t.column :questionnaire_id,     :integer, null: true
      t.column :user_id,              :integer, null: true
      t.column :notification_limit,   :integer, null: false, default: 15
      t.column :questionnaire_weight, :integer, null: false, default: 0
    end

 
    
  def self.make_association(model, assignment, questionnaire_id)
    q = Object.const_get(model).find(questionnaire_id)
    association = AssignmentQuestionnaire.create(assignment_id: assignment.id, questionnaire_id: q.id)
    l_records = ActiveRecord::Base.connection.select_all("select * from notification_limits where assignment_id = #{assignment.id} and questionnaire_id = #{q.id}")
    w_records = ActiveRecord::Base.connection.select_all("select * from questionnaire_weights where assignment_id = #{assignment.id} and questionnaire_id = #{q.id}")

    unless l_records.empty?
      association.update_attribute('user_id', l_records[0]['user_id'])
      association.update_attribute('notification_limit', l_records[0]['limit'])
      execute "delete from notification_limits where assignment_id = #{assignment.id} and questionnaire_id = #{q.id}"
    end