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

#Table of track data hub connection status.
CREATE TABLE hubStatus (
    id int unsigned not null auto_increment,	# Auto-incrementing hub ID
    hubUrl longblob not null,	# URL to hub.ra file
    shortLabel varchar(255) not null,	# Hub short label.
    longLabel varchar(255) not null,	# Hub long label.
    dbCount int unsigned not null,	# Number of databases hub has data for.
    dbList longblob not null,	# Comma separated list of databases.
    status int unsigned not null,	# 1 if private
    lastOkTime varchar(255) not null,	# Time when hub last was ok
    lastNotOkTime varchar(255) not null,	# Time when hub last was not ok
    errorMessage longblob not null,	# If non-empty contains last error message from hub. If empty hub is ok.
    firstAdded varchar(255) not null,	# Time when hub was first added
              #Indices
    PRIMARY KEY(id),
    INDEX(hubUrl(200))
);
