Файл: install/sql.sql
Строк: 149
CREATE TABLE IF NOT EXISTS `diaries` (
`id` int(11) NOT NULL
AUTO_INCREMENT,
`id_user` int(11) DEFAULT NULL,
`name` text NOT NULL,
`msg` text NOT NULL,
`img` text,
`img2` text,
`img3` text,
`time`
int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT
CHARSET=utf8 ;
--
--------------------------------------------------------
CREATE TABLE IF
NOT EXISTS `d_looks` (
`id_diary` int(11) NOT NULL,
`id_user` int(11)
NOT NULL,
KEY `id_diary` (`id_diary`,`id_user`)
) ENGINE=MyISAM DEFAULT
CHARSET=utf8;
--
--------------------------------------------------------
CREATE TABLE IF
NOT EXISTS `d_post` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`diary_id`
int(11) NOT NULL,
`id_user` int(11) NOT NULL,
`msg` text NOT NULL,
`quote` text,
`reply` int(11) DEFAULT NULL,
`time` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;
--
--------------------------------------------------------
CREATE TABLE IF
NOT EXISTS `forum` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` text
NOT NULL,
`opis` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM
DEFAULT CHARSET=utf8 ;
--
--------------------------------------------------------
CREATE TABLE IF
NOT EXISTS `f_category` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`forum_id` int(11) NOT NULL,
`name` text NOT NULL,
`opis` text NOT
NULL,
PRIMARY KEY (`id`),
KEY `forum_id` (`forum_id`)
) ENGINE=MyISAM
DEFAULT CHARSET=utf8 ;
--
--------------------------------------------------------
CREATE TABLE IF
NOT EXISTS `f_post` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`forum_id`
int(11) NOT NULL,
`cat_id` int(11) NOT NULL,
`them_id` int(11) NOT
NULL,
`id_user` int(11) NOT NULL,
`msg` text NOT NULL,
`hide`
varchar(16) NOT NULL,
`reply` int(11) DEFAULT NULL,
`quote` text,
`time` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `id_user`
(`id_user`),
KEY `time` (`time`),
KEY `forum_id` (`forum_id`),
KEY
`cat_id` (`cat_id`),
KEY `them_id` (`them_id`),
FULLTEXT KEY `msg`
(`msg`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;
--
--------------------------------------------------------
CREATE TABLE IF
NOT EXISTS `f_theme` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`forum_id`
int(11) NOT NULL,
`cat_id` int(11) DEFAULT NULL,
`id_user` int(11)
DEFAULT NULL,
`name` varchar(50) NOT NULL,
`msg` varchar(20000) NOT
NULL,
`fix` set('0','1') NOT NULL DEFAULT '0',
`close` set('0','1') NOT
NULL DEFAULT '0',
`last_post` int(11) NOT NULL,
`who_close` varchar(16)
NOT NULL,
`time` int(11) NOT NULL,
`views` int(11) NOT NULL DEFAULT
'0',
PRIMARY KEY (`id`),
KEY `forum_id` (`forum_id`,`cat_id`),
FULLTEXT KEY `name` (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;
--
--------------------------------------------------------
CREATE TABLE IF
NOT EXISTS `f_views` (
`id_them` int(11) NOT NULL,
`id_user` int(11)
NOT NULL,
`time` int(11) DEFAULT NULL,
KEY `forum_id`
(`id_them`,`id_user`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
--------------------------------------------------------
CREATE TABLE IF
NOT EXISTS `guests` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`ip` text
NOT NULL,
`browser` text NOT NULL,
`time` int(11) NOT NULL,
PRIMARY
KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;
--
--------------------------------------------------------
CREATE TABLE IF
NOT EXISTS `mail` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_1`
int(11) NOT NULL,
`user_2` int(11) NOT NULL,
`time` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;
--
--------------------------------------------------------
CREATE TABLE IF
NOT EXISTS `mail_msg` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_1`
int(11) NOT NULL,
`user_2` int(11) NOT NULL,
`msg` text NOT NULL,
`chit` int(11) NOT NULL,
`time` int(11) NOT NULL,
PRIMARY KEY (`id`)
)
ENGINE=MyISAM DEFAULT CHARSET=utf8 ;
--
--------------------------------------------------------
CREATE TABLE IF
NOT EXISTS `mchat` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`msg` text,
`id_user` int(11) NOT NULL DEFAULT '0',
`reply` int(11) DEFAULT NULL,
`quote` text,
`time` int(11) NOT NULL,
PRIMARY KEY (`id`)
)
ENGINE=MyISAM DEFAULT CHARSET=utf8 ;
--
--------------------------------------------------------
CREATE TABLE IF
NOT EXISTS `news` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id`
int(11) NOT NULL,
`name` text NOT NULL,
`msg` text,
`time` int(11)
NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT
CHARSET=utf8 ;
--
--------------------------------------------------------
CREATE TABLE IF
NOT EXISTS `notifications` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`from_id` int(11) NOT NULL,
`msg` text NOT
NULL,
`read` set('0','1') NOT NULL DEFAULT '0',
`message` text NOT
NULL,
`time` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `user_id`
(`user_id`,`from_id`),
KEY `read` (`read`)
) ENGINE=MyISAM DEFAULT
CHARSET=utf8 ;
--
--------------------------------------------------------
CREATE TABLE IF
NOT EXISTS `n_post` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`news_id`
int(11) NOT NULL,
`id_user` int(11) NOT NULL,
`msg` text NOT NULL,
`reply` int(11) DEFAULT NULL,
`quote` text,
`time` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;
--
--------------------------------------------------------
CREATE TABLE IF
NOT EXISTS `rekl` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` text,
`url` text,
`pos` text,
`time` int(11) NOT NULL,
PRIMARY KEY
(`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;
--
--------------------------------------------------------
CREATE TABLE IF
NOT EXISTS `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`login`
varchar(15) NOT NULL,
`pass` text NOT NULL,
`position`
enum('user','mod_c','mod_f','admin') DEFAULT 'user',
`avatar`
varchar(100) DEFAULT '0',
`pol` enum('0','1') DEFAULT '1',
`bonus`
int(11) NOT NULL,
`status` text,
`name` text,
`age` int(3) DEFAULT
NULL,
`agent` text,
`IP` text,
`time_last` int(11) NOT NULL DEFAULT
'0',
`time_reg` int(11) NOT NULL DEFAULT '0',
`timezone` varchar(55)
DEFAULT 'Europe/Moscow',
`p_page` int(3) DEFAULT '10',
`email` text,
`activation` enum('0','1') NOT NULL,
`md5_activation` varchar(250)
DEFAULT NULL,
PRIMARY KEY (`id`,`login`),
UNIQUE KEY `login`
(`login`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;
--
--------------------------------------------------------
CREATE TABLE IF
NOT EXISTS `user_files` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`dir_id` int(11) NOT NULL,
`filename`
text,
`name` text,
`desc` text,
`ext` varchar(50) DEFAULT NULL,
`screenshot` text,
`size` int(100) NOT NULL,
`time` int(11) NOT NULL,
`loads` int(11) DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT
CHARSET=utf8 ;
--
--------------------------------------------------------
CREATE TABLE IF
NOT EXISTS `user_f_dir` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`name` varchar(100) DEFAULT NULL,
PRIMARY
KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;
--
--------------------------------------------------------
CREATE TABLE IF
NOT EXISTS `user_f_looks` (
`id_file` int(11) NOT NULL,
`id_user`
int(11) NOT NULL,
KEY `id_file` (`id_file`,`id_user`)
) ENGINE=MyISAM
DEFAULT CHARSET=utf8;
--
--------------------------------------------------------
CREATE TABLE IF
NOT EXISTS `user_f_post` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`file_id` int(11) NOT NULL,
`id_user` int(11) NOT NULL,
`msg` text NOT
NULL,
`quote` text,
`reply` int(11) DEFAULT NULL,
`time` int(11) NOT
NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;
--
--------------------------------------------------------
CREATE TABLE IF
NOT EXISTS `ban` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_login`
text NOT NULL,
`ank_id` int(11) NOT NULL,
`msg` varchar(1024) DEFAULT
NULL,
`time` int(11) NOT NULL DEFAULT '0',
`show` int(32) NOT NULL,
`ban_time` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT
CHARSET=utf8 ;
--
--------------------------------------------------------
CREATE TABLE IF
NOT EXISTS `friends_all` (
`user` int(11) NOT NULL DEFAULT '0',
`frend`
int(11) NOT NULL DEFAULT '0',
`time` int(11) NOT NULL,
`i` int(1)
DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=utf8
COLLATE=utf8_unicode_ci;
--
--------------------------------------------------------
CREATE TABLE IF
NOT EXISTS `friends_new` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user`
int(11) NOT NULL DEFAULT '0',
`to` int(11) NOT NULL DEFAULT '0',
`time`
int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8
COLLATE=utf8_unicode_ci;
--
--------------------------------------------------------
CREATE TABLE IF
NOT EXISTS `like_f_post` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`forum_id` int(11) NOT NULL,
`cat_id` int(11) NOT NULL,
`them_id`
int(11) NOT NULL,
`post_id` int(11) NOT NULL,
`id_user` int(11) NOT
NULL,
`like` int(1) NOT NULL DEFAULT '0',
`time` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
--------------------------------------------------------
CREATE TABLE IF
NOT EXISTS `reviews` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_reviews` int(32) NOT NULL,
`attitude` int(1) NOT NULL,
`msg`
varchar(1024) DEFAULT NULL,
`id_user` int(11) NOT NULL DEFAULT '0',
`time` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT
CHARSET=utf8;