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: 058_remove_notes_from_artists.rb
    path of file: ./repos/moebooru/db/migrate
    
    the code of the file until where you have to start completion: class RemoveNotesFromArtists < ActiveRecord::Migration[5.1]
  def self.up
    Artist.find(:all, conditions: [ "notes <> '' and notes is not null" ]).each do |artist|
      page = WikiPage.find_by_title(artist.name)
      note
    
  def self.up
    Artist.find(:all, conditions: [ "notes <> '' and notes is not null" ]).each do |artist|
      page = WikiPage.find_by_title(artist.name)
      notes = artist.__send__(:read_attribute, :notes)

      if page
        page.update(body: notes, ip_addr: "127.0.0.1", user_id: 1)
      else
        WikiPage.create(title: artist.name, body: notes, ip_addr: "127.0.0.1", user_id: 1)
      end
    end