Файл: install/base.sql
Строк: 193
CREATE TABLE IF NOT EXISTS `antimessage` (
`id` int(11) NOT NULL
AUTO_INCREMENT,
`mess` varchar(80) NOT NULL,
`messoff` varchar(80) NOT
NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8
AUTO_INCREMENT=1;
CREATE TABLE IF NOT EXISTS `ban` (
`id` int(11) NOT
NULL AUTO_INCREMENT,
`yaid` int(11) NOT NULL,
`ip` char(30) NOT NULL,
`type` text NOT NULL,
`iduser` int(11) NOT NULL,
`text` text NOT NULL,
`bantime` int(11) NOT NULL,
`time` int(11) NOT NULL,
PRIMARY KEY
(`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
CREATE
TABLE IF NOT EXISTS `comes` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user` int(11) NOT NULL,
`idwh` int(11) NOT NULL,
`text` text NOT
NULL,
`where` text NOT NULL,
`time` int(11) NOT NULL,
PRIMARY KEY
(`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
CREATE
TABLE IF NOT EXISTS `comes_cat` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` text NOT NULL,
`where` text NOT NULL,
PRIMARY KEY (`id`)
)
ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
CREATE TABLE IF NOT
EXISTS `country` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` text
NOT NULL,
`name_eng` text NOT NULL,
`icon` text NOT NULL,
PRIMARY KEY
(`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
CREATE
TABLE IF NOT EXISTS `country_city` (
`id` int(11) NOT NULL
AUTO_INCREMENT,
`name` text NOT NULL,
`name_eng` text NOT NULL,
`yandex_id` int(11) NOT NULL,
`country` int(11) NOT NULL,
`region`
int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT
CHARSET=utf8 AUTO_INCREMENT=1;
CREATE TABLE IF NOT EXISTS
`country_region` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` text
NOT NULL,
`region` int(11) NOT NULL,
`country` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8
AUTO_INCREMENT=1;
CREATE TABLE IF NOT EXISTS `dialogs` (
`id` int(11)
NOT NULL AUTO_INCREMENT,
`user` varchar(14) NOT NULL,
`oid` int(11) NOT
NULL,
`time` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM
DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
CREATE TABLE IF NOT EXISTS `faq`
(
`id` int(11) NOT NULL AUTO_INCREMENT,
`sid` int(11) NOT NULL,
`type` text NOT NULL,
`if_dir` int(11) NOT NULL,
`name` text NOT NULL,
`text` text NOT NULL,
`page` text NOT NULL,
`time` int(11) NOT NULL,
`user` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT
CHARSET=utf8 AUTO_INCREMENT=1;
CREATE TABLE IF NOT EXISTS `files` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`what` varchar(255) NOT NULL,
`where` int(11) NOT NULL,
`url` text NOT NULL,
`info` text NOT NULL,
`format` text NOT NULL,
`name` varchar(255) NOT NULL,
`user` int(11)
NOT NULL,
`pass` varchar(8) NOT NULL,
`time` int(11) NOT NULL,
`load`
int(11) NOT NULL,
`views` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY
`id` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1
;
CREATE TABLE IF NOT EXISTS `function` (
`id` int(11) NOT NULL
AUTO_INCREMENT,
`name` text NOT NULL,
`admin_panel` int(1) NOT NULL,
`function` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT
CHARSET=utf8 AUTO_INCREMENT=1;
CREATE TABLE IF NOT EXISTS
`groups_function` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`group`
int(11) NOT NULL,
`function` int(11) NOT NULL,
PRIMARY KEY (`id`)
)
ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
CREATE TABLE IF NOT
EXISTS `groups_users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uid`
int(11) NOT NULL,
`group` int(11) NOT NULL,
`yaid` int(11) NOT NULL,
`time` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT
CHARSET=utf8 AUTO_INCREMENT=1;
CREATE TABLE IF NOT EXISTS `language` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` text NOT NULL,
`country`
text NOT NULL,
`code` text NOT NULL,
`sort` int(11) NOT NULL,
PRIMARY
KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
CREATE
TABLE IF NOT EXISTS `lenta` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uid` int(11) NOT NULL,
`type` int(11) NOT NULL,
`text` text NOT NULL,
`from` int(11) NOT NULL,
`url` text NOT NULL,
`status` int(1) NOT NULL
DEFAULT '1',
`where` int(11) NOT NULL DEFAULT '0',
`time` int(11) NOT
NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8
AUTO_INCREMENT=1;
CREATE TABLE IF NOT EXISTS `mail` (
`id` int(11) NOT
NULL AUTO_INCREMENT,
`fid` int(11) NOT NULL,
`oid` int(11) NOT NULL,
`dialog` int(11) NOT NULL,
`title` varchar(150) NOT NULL,
`text` text
NOT NULL,
`read` enum('yes','no','save') NOT NULL DEFAULT 'no',
`time`
int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT
CHARSET=utf8 AUTO_INCREMENT=1;
CREATE TABLE IF NOT EXISTS `menu` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` text NOT NULL,
`tip`
varchar(40) NOT NULL,
`view` text NOT NULL,
`url` text NOT NULL,
`chet` varchar(40) NOT NULL,
`icon` varchar(40) NOT NULL,
`sid` int(11)
NOT NULL,
`info` text NOT NULL,
`time` int(11) NOT NULL,
PRIMARY KEY
(`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
CREATE
TABLE IF NOT EXISTS `nuts` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user` int(11) NOT NULL,
`idwh` int(11) NOT NULL,
`where` text NOT
NULL,
`time` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM
DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
CREATE TABLE IF NOT EXISTS
`online` (
`login` varchar(40) NOT NULL,
`id` int(11) NOT NULL,
`session` varchar(100) NOT NULL,
`ip` char(30) NOT NULL,
`browser`
varchar(100) NOT NULL,
`where` text NOT NULL,
`time` int(11) NOT NULL
)
ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `reit` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`kto` int(11) NOT NULL,
`komy`
int(11) NOT NULL,
`text` text NOT NULL,
`rei` int(11) NOT NULL,
`where` text NOT NULL,
`time` int(11) NOT NULL,
PRIMARY KEY (`id`)
)
ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
CREATE TABLE IF NOT
EXISTS `reklama` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title`
varchar(60) NOT NULL,
`sort` int(11) NOT NULL,
`url` text NOT NULL,
`img` text NOT NULL,
`poz` int(2) NOT NULL,
`type` text NOT NULL,
`people` int(11) NOT NULL,
`time` int(11) NOT NULL,
PRIMARY KEY
(`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
CREATE
TABLE IF NOT EXISTS `report` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user` int(11) NOT NULL,
`uid` int(11) NOT NULL,
`text` text NOT NULL,
`come` text NOT NULL,
`type` text NOT NULL,
`where` text NOT NULL,
`time` int(11) NOT NULL,
`status` varchar(40) NOT NULL DEFAULT 'open',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1
;
CREATE TABLE IF NOT EXISTS `settings` (
`name` text NOT NULL,
`parametr` text NOT NULL,
`comments` text NOT NULL
) ENGINE=MyISAM
DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `sitemap` (
`id`
int(11) NOT NULL AUTO_INCREMENT,
`type` varchar(10) NOT NULL,
`rule`
text NOT NULL,
`info` text NOT NULL,
`table` text NOT NULL,
PRIMARY
KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1
;
CREATE TABLE IF NOT EXISTS `styles` (
`id` int(11) NOT NULL
AUTO_INCREMENT,
`name` text NOT NULL,
`url` text NOT NULL,
`time`
int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT
CHARSET=utf8 AUTO_INCREMENT=1 ;
CREATE TABLE IF NOT EXISTS `top` (
`agent` text NOT NULL,
`type_browser` text NOT NULL,
`country` text NOT
NULL,
`city` text NOT NULL,
`region` text NOT NULL,
`zip` int(10) NOT
NULL,
`user` text NOT NULL,
`id` int(11) NOT NULL,
`ip` text NOT
NULL,
`hits` int(11) NOT NULL,
`time` int(11) NOT NULL,
`day` int(2)
NOT NULL,
`month` int(2) NOT NULL,
`year` int(4) NOT NULL,
`version`
text NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT
EXISTS `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`login`
varchar(40) NOT NULL,
`pass` varchar(100) NOT NULL,
`email` varchar(50)
NOT NULL,
`email_act` enum('yes','no') NOT NULL,
`language` int(11) NOT
NULL,
`gmt` int(11) NOT NULL DEFAULT '0',
`site` varchar(40) NOT NULL,
`name` varchar(40) NOT NULL,
`fami` varchar(40) NOT NULL,
`foto`
int(11) NOT NULL,
`sex` enum('m','w') NOT NULL,
`day` tinyint(2) NOT
NULL,
`month` tinyint(2) NOT NULL,
`year` smallint(4) NOT NULL,
`city` int(11) NOT NULL,
`number` text NOT NULL,
`balls` int(9) NOT
NULL,
`skype` varchar(11) NOT NULL,
`about` text NOT NULL,
`act`
enum('yes','no') NOT NULL,
`actid` int(11) NOT NULL,
`mail` int(1) NOT
NULL,
`ip` text NOT NULL,
`browser` text NOT NULL,
`sort` char(4) NOT
NULL DEFAULT 'ASC',
`style` varchar(30) NOT NULL DEFAULT 'standart',
`num` tinyint(2) NOT NULL DEFAULT '10',
`lasttime` int(11) NOT NULL,
`time` int(11) NOT NULL,
`online` int(11) NOT NULL,
`money` int(11) NOT
NULL,
`autoritet` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM
DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
CREATE TABLE IF NOT EXISTS
`user_groups` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` text NOT
NULL,
`info` text NOT NULL,
`sort` int(11) NOT NULL,
`time` int(11)
NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8
AUTO_INCREMENT=1 ;