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: 20151125123352_create_notifications_endpoint.rb
    path of file: ./repos/catarse/db/migrate
    
    the code of the file until where you have to start completion: class CreateNotificationsEndpoint < ActiveRecord::Migration
  def change
    execute <<-SQL
    CREATE O
    
  def change
    execute <<-SQL
    CREATE OR REPLACE VIEW "1".notifications AS
    SELECT * FROM
    (
        SELECT user_id, template_name, created_at, sent_at, deliver_at FROM category_notifications
        UNION ALL
        SELECT user_id, template_name, created_at, sent_at, deliver_at FROM donation_notifications
        UNION ALL
        SELECT user_id, template_name, created_at, sent_at, deliver_at FROM user_notifications
        UNION ALL
        SELECT user_id, template_name, created_at, sent_at, deliver_at FROM project_notifications
        UNION ALL
        SELECT user_id, template_name, created_at, sent_at, deliver_at FROM user_transfer_notifications
        UNION ALL
        SELECT user_id, template_name, created_at, sent_at, deliver_at FROM project_post_notifications
        UNION ALL
        SELECT user_id, template_name, created_at, sent_at, deliver_at FROM contribution_notifications
    ) n;

    grant select on "1".notifications to admin;
    SQL
  end
end