CREATE TABLE admin (
  id int(3) NOT NULL AUTO_INCREMENT,
  username varchar(100) NOT NULL,
  `password` varchar(100) NOT NULL DEFAULT '',
  unread int(5) NOT NULL,
  PRIMARY KEY (id)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

CREATE TABLE admin_unread (
  id int(5) NOT NULL AUTO_INCREMENT,
  user_id int(5) NOT NULL,
  PRIMARY KEY (id)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

CREATE TABLE clients (
  id int(3) NOT NULL AUTO_INCREMENT,
  username varchar(100) NOT NULL,
  fullname varchar(100) NOT NULL,
  `password` varchar(100) NOT NULL,
  email varchar(100) NOT NULL,
  service varchar(100) NOT NULL,
  `status` varchar(100) NOT NULL,
  price varchar(100) NOT NULL DEFAULT '',
  payments int(3) NOT NULL,
  notes text NOT NULL,
  unread int(5) NOT NULL,
  PRIMARY KEY (id)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

CREATE TABLE files (
  id int(3) NOT NULL AUTO_INCREMENT,
  title varchar(100) NOT NULL,
  description text NOT NULL,
  user_id int(3) NOT NULL,
  url varchar(100) NOT NULL,
  PRIMARY KEY (id)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

CREATE TABLE file_comments (
  id int(3) NOT NULL AUTO_INCREMENT,
  `comment` text NOT NULL,
  file_id int(3) NOT NULL,
  admin varchar(10) NOT NULL,
  PRIMARY KEY (id)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

CREATE TABLE notes (
  id int(3) NOT NULL AUTO_INCREMENT,
  `text` text NOT NULL,
  isadmin int(1) NOT NULL,
  user_id int(3) NOT NULL,
  PRIMARY KEY (id)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

CREATE TABLE payments (
  id int(3) NOT NULL AUTO_INCREMENT,
  user_id int(3) NOT NULL,
  `date` date NOT NULL,
  PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;