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: change_sequence.rb
    path of file: ./repos/pg_trunk/lib/pg_trunk/operations/sequences
    
    the code of the file until where you have to start completion: # frozen_string_literal: false

# @!parse
#   class ActiveRecord::Migration
#     # Modify a sequence
#     #
#     # @param [#to_s] name (nil) The qualified name of the sequence.
#     # @option options [Boolean] :if_exists (false) Suppress the error when the sequence is absent.
#     # @yield [s] the block with the sequence's definition.
#     # @yieldparam Object receiver of methods specifying the sequence.
#     # @return [void]
#     #
#     # The operation enables to alter a sequence without re
    
    def alter_sequence
      return if changes.except(:comment).blank?

      sql = "ALTER SEQUENCE"
      sql << " IF EXISTS" if if_exists
      sql << " #{name.to_sql}"
      sql << " AS #{type}" if type.present?
      sql << " INCREMENT BY #{increment_by}" if increment_by.present?
      sql << " MINVALUE #{min_value}" if min_value&.>(-INF)
      sql << " NO MINVALUE" if min_value&.<=(-INF)
      sql << " MAXVALUE #{max_value}" if max_value&.<(INF)
      sql << " NO MAXVALUE" if max_value&.>=(INF)
      sql << " START WITH #{start_with}" if start_with.present?
      sql << " CACHE #{cache}" if cache.present?
      sql << " OWNED BY #{table}.#{column}" if table.present? && column.present?
      sql << " OWNED BY NONE" if table == "" || column == ""
      sql << " CYCLE" if cycle
      sql << " NO CYCLE" if cycle == false
      sql << ";"
    end