# --------------------------------------------------------

#
# Table structure for table `files`
#

CREATE TABLE `files` (
  `id_file` int(11) NOT NULL auto_increment,
  `id_cat` int(11) default NULL,
  `name` varchar(50) NOT NULL default '',
  `description` varchar(100) NOT NULL default '',
  `hash` varchar(16) NOT NULL default '',
  `visible` int(11) NOT NULL default '0',
  `public` int(11) NOT NULL default '0',
  `size` int(11) NOT NULL default '0',
  `added` date NOT NULL default '0000-00-00',
  `downloads` int(11) NOT NULL default '0',
  `lastip` varchar(15) NOT NULL default '',
  `notes` TEXT NOT NULL,
   `user_status` SET('-3', '-2', '-1', '0', '1') NOT NULL,
  PRIMARY KEY  (`id_file`)
) ENGINE=MyISAM AUTO_INCREMENT=1 ;

# --------------------------------------------------------

#
# Table structure for table `files_cats`
#

CREATE TABLE `files_cats` (
  `id_cat` int(11) NOT NULL auto_increment,
  `id_parent` int(11) default NULL,
  `name` varchar(50) NOT NULL default '',
  `visible` int(11) NOT NULL default '0',
  `public` int(11) NOT NULL default '0',
  `user_status` SET('-3', '-2', '-1', '0', '1') NOT NULL,
  PRIMARY KEY  (`id_cat`)
) ENGINE=MyISAM AUTO_INCREMENT=1 ;

# --------------------------------------------------------

#
# Table structure for table `files_cats_clienttypes`
#

CREATE TABLE `files_cats_clienttypes` (
  `id_cat` int(11) NOT NULL default '0',
  `id_clienttype` int(11) NOT NULL default '0',
  PRIMARY KEY  (`id_cat`,`id_clienttype`)
) ENGINE=MyISAM;

# --------------------------------------------------------

#
# Table structure for table `files_cats_servers`
#

CREATE TABLE `files_cats_servers` (
  `id_cat` int(11) NOT NULL default '0',
  `id_server` int(11) NOT NULL default '0',
  PRIMARY KEY  (`id_cat`,`id_server`)
) ENGINE=MyISAM;

# --------------------------------------------------------

#
# Table structure for table `files_cats_users`
#

CREATE TABLE `files_cats_users` (
  `id_cat` int(11) NOT NULL default '0',
  `id_user` int(11) NOT NULL default '0',
  PRIMARY KEY  (`id_cat`,`id_user`)
) ENGINE=MyISAM;

# --------------------------------------------------------

#
# Table structure for table `files_clienttypes`
#

CREATE TABLE `files_clienttypes` (
  `id_file` int(11) NOT NULL default '0',
  `id_clienttype` int(11) NOT NULL default '0',
  PRIMARY KEY  (`id_file`,`id_clienttype`)
) ENGINE=MyISAM;

# --------------------------------------------------------

#
# Table structure for table `files_servers`
#

CREATE TABLE `files_servers` (
  `id_file` int(11) NOT NULL default '0',
  `id_server` int(11) NOT NULL default '0',
  PRIMARY KEY  (`id_file`,`id_server`)
) ENGINE=MyISAM;

# --------------------------------------------------------

#
# Table structure for table `files_users`
#

CREATE TABLE `files_users` (
  `id_file` int(11) NOT NULL default '0',
  `id_user` int(11) NOT NULL default '0',
  PRIMARY KEY  (`id_file`,`id_user`)
) ENGINE=MyISAM;
