CREATE TABLE ds_shots (
  id int DEFAULT '0' NOT NULL auto_increment,      #  0 - ID
  author int NOT NULL,                             #  1 - Author's user ID
  created datetime NOT NULL,                       #  2 - Date added
  views int NOT NULL,                              #  3 - Number of views
  url varchar(200) NOT NULL,                       #  4 - URL
  smallurl varchar(200) NOT NULL,                  #  5 - URL to preview
  description text NOT NULL,                       #  6 - Description
  shortdesc text NOT NULL,                         #  7 - Short Description
  rating int NOT NULL,                             #  8 - Rating
  PRIMARY KEY (id)
);

CREATE TABLE ds_users (
  id int DEFAULT '0' NOT NULL auto_increment,      # 0 - User ID
  username varchar(50) NOT NULL,                   # 1 - Username
  name varchar(50) NOT NULL,                       # 2 - Real name
  email varchar(35) NOT NULL,                      # 3 - E-mail address
  bio text NOT NULL,                               # 4 - Biography/other information, etc
  admin int NOT NULL,                              # 5 - Is user an admin?
  pass varchar(50) NOT NULL,                       # 6 - Password
  msn varchar(50) NOT NULL,                        # 7 - MSN Messenger ID
  icq varchar(50) NOT NULL,                        # 8 - ICQ ID
  website varchar(100) NOT NULL,                   # 9 - Web site
  PRIMARY KEY (id)
);

CREATE TABLE ds_comments (
  id int DEFAULT '0' NOT NULL auto_increment,      #  0 - ID
  userid int DEFAULT '-1' NOT NULL,                #  1 - User ID (if registered)
  author varchar(35) NOT NULL,                     #  2 - Name (if not)
  email varchar(35) NOT NULL,                      #  3 - E-mail address
  title varchar(50) NOT NULL,                      #  4 - Title of comment
  rating int NOT NULL,                             #  5 - Rating
  date date NOT NULL,                              #  6 - Date
  time time NOT NULL,                              #  7 - Time
  comment blob NOT NULL,                           #  8 - Comment
  shotid int NOT NULL,                             #  9 - Screenshot ID
  onlyrating int NOT NULL,                         # 10 - T if only rating, F if other info
  reguser int NOT NULL,                            # 11 - Registered user?
  PRIMARY KEY (id)
);