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: 20150928111645_fix_is_owner_or_admin.rb
    path of file: ./repos/catarse/db/migrate
    
    the code of the file until where you have to start completion: class FixIsOwnerOrAdmin < ActiveRecord::Migration
  def up
    execute <<-SQL
      CREATE OR REPLACE FUNCTION public.is_owner_or_admin(integer) RETURNS boolean
          LANGUAGE
    
  def up
    execute <<-SQL
      CREATE OR REPLACE FUNCTION public.is_owner_or_admin(integer) RETURNS boolean
          LANGUAGE sql STABLE
          AS $_$
              SELECT
                current_setting('user_vars.user_id') = $1::text
                OR current_user = 'admin';
            $_$;
    SQL
  end