import enum
from sqlalchemy import Column, Integer, String, Enum

from virtool.pg.utils import Base, SQLEnum


class IndexType(str, SQLEnum):
    """
    Enumerated type for index file types

    """

    json = "json"
    fasta = "fasta"
    bowtie2 = "bowtie2"


class IndexFile(Base):
    """
    SQL model to store new index files

    """
    __tablename__ = "index_files"

    id = Column(Integer, primary_key=True)
    name = Column(String)
    reference = Column(String)
    type = Column(Enum(IndexType))
    size = Column(Integer)

    def __repr__(self):
        return f"<IndexFile(id={self.id}, name={self.name}, reference={self.reference}, type={self.type}, " \
               f"size={self.size} "

@@ -445,25 +445,21 @@
 ng)%0A    
-reference
+index
  = Colum
@@ -619,33 +619,25 @@
 e%7D, 
-reference=%7Bself.reference
+index=%7Bself.index
 %7D, t

Update IndexFile model to have 'index' column instead of 'reference'