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: 20150923165654_fix_near_me_function.rb
    path of file: ./repos/catarse/db/migrate
    
    the code of the file until where you have to start completion: class FixNearMeFunction < ActiveRecord::Migration
  def change
    execute "
        CREATE O
    
  def change
    execute "
        CREATE OR REPLACE FUNCTION public.near_me(\"1\".projects)
         RETURNS boolean
         LANGUAGE sql
         STABLE SECURITY DEFINER
        AS $function$
          SELECT 
      COALESCE($1.state_acronym, (SELECT pa.address_state FROM project_accounts pa WHERE pa.project_id = $1.project_id)) = (SELECT u.address_state FROM users u WHERE u.id = nullif(current_setting('user_vars.user_id'), '')::int)
        $function$
      "
  end