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: 20151221230617_new_postgrest_current_user_id.rb
    path of file: ./repos/catarse/db/migrate
    
    the code of the file until where you have to start completion: class NewPostgrestCurrentUserId < ActiveRecord::Migration
  def up
    #current_database = execute("SELECT current_database();
    
  def down
    execute <<-SQL
    CREATE OR REPLACE FUNCTION public.current_user_id() RETURNS int
    LANGUAGE sql
    AS $_$
        SELECT nullif(current_setting('user_vars.user_id'), '')::integer;
    $_$;
    SQL
  end