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: 20210915064327_add_metadata_to_spree_taxons_and_taxonomies.rb
    path of file: ./repos/spree/core/db/migrate
    
    the code of the file until where you have to start completion: class AddMetadataToSp
    
  def change
    %i[
      spree_taxons
      spree_taxonomies
    ].each do |table_name|
      change_table table_name do |t|
        if t.respond_to? :jsonb
          add_column table_name, :public_metadata, :jsonb
          add_column table_name, :private_metadata, :jsonb
        else
          add_column table_name, :public_metadata, :json
          add_column table_name, :private_metadata, :json
        end
      end
    end