class AddSourceSnapshotToMaterialVersions < ActiveRecord::Migration[8.0]
  def change
    unless column_exists?(:material_versions, :source_kind)
      add_column :material_versions, :source_kind, :string
    end
    unless column_exists?(:material_versions, :source_uri)
      add_column :material_versions, :source_uri, :string
    end
    unless column_exists?(:material_versions, :source_path)
      add_column :material_versions, :source_path, :string
    end
    unless column_exists?(:material_versions, :source_file_id)
      add_column :material_versions, :source_file_id, :string
    end
    unless column_exists?(:material_versions, :normalized_source_key)
      add_column :material_versions, :normalized_source_key, :string
    end
  end
end
