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: 20161219154635_create_credit_cards_endpoint.rb
    path of file: ./repos/catarse/db/migrate
    
    the code of the file until where you have to start completion: class CreateCreditCardsEndpoint < ActiveRecord::Migration
  def change
    execute <<-SQL
    CREATE OR REPLACE VIEW "1".user_credit_cards AS
    select id, user_id,last_digits, card_brand from 
    
  def change
    execute <<-SQL
    CREATE OR REPLACE VIEW "1".user_credit_cards AS
    select id, user_id,last_digits, card_brand from credit_cards cc
    where is_owner_or_admin(cc.user_id);

    GRANT SELECT ON "1".user_credit_cards to admin;
    GRANT SELECT ON "1".user_credit_cards to web_user;
    SQL
  end