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: 20220128133226_fix_story_mod_notes.rb
    path of file: ./repos/lobsters/db/migrate
    
    the code of the file until where you have to start completion: class FixStoryModNotes < ActiveRecord::Migration[6.1]
  def up
    # fix formatting in existing notes
    ActiveRecord::Base.connection.execute <<~SQL
      update mod_notes set note = 
        replace(
          replace(
            replace(
              replace(
                note,
                "\nurl: ", "\n- url: "
  
    
  def up
    # fix formatting in existing notes
    ActiveRecord::Base.connection.execute <<~SQL
      update mod_notes set note = 
        replace(
          replace(
            replace(
              replace(
                note,
                "\nurl: ", "\n- url: "
              ),
              "title: ", "\n- title: "
            ),
            "user_is_author: ", "\n- user_is_author: "
          ),
          "etags: ", "e\n- tags: "
        )
      where note like "Attempted to post a story %";
    SQL
    # rerender markdown
    ModNote.where('note like "Attempted to post a story %"').each do |mn|
      mn.markeddown_note = mn.generated_markeddown
      mn.save!
    end
  end