# ottoRequest.sql was originally generated by the autoSql program, which also 
# generated ottoRequest.c and ottoRequest.h.  This creates the database representation of
# an object which can be loaded and saved from RAM in a fairly 
# automatic way.

#recording requests coming from from functions such as liftRequest
CREATE TABLE ottoRequest (
    id int unsigned not null auto_increment,	# Auto-incrementing request count
    fromDb varchar(255) not null,	# can be a database name or a GC[AF]_ GenArk accession
    toDb varchar(255) not null,	# can be a database name or a GC[AF]_ GenArk accession
    email varchar(255) not null,	# user email address
    comment longtext not null,	# other comments from the input form
    requestTime datetime not null,	# date time request was added
    doneStatus tinyint unsigned not null,	# # 1 == alignment is complete, 0 == alignment to be done
    completeTime datetime default null,	# date time for alignment completed and user notified
              #Indices
    PRIMARY KEY(id),
    INDEX(doneStatus),
    INDEX(requestTime)
);
