Файл: install/db_tables/diary.sql
Строк: 69
CREATE TABLE IF NOT EXISTS `diary` (
`id` int(11) NOT NULL
AUTO_INCREMENT,
`id_user` int(11) DEFAULT '0',
`name` varchar(100)
DEFAULT NULL,
`text` mediumtext,
`tags` mediumtext,
`no_komm`
enum('1','0') DEFAULT '0',
`+18` enum('1','0') DEFAULT '0',
`type`
enum('all','only_me','friends','pass','list') NOT NULL,
`poll`
enum('1','0') DEFAULT '0',
`poll_text` mediumtext,
`poll_timee` int(11)
DEFAULT '86400',
`poll_time` int(11) DEFAULT NULL,
`time` int(11)
DEFAULT NULL,
`count_visits` int(11) DEFAULT '0',
`pass` mediumtext,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF
NOT EXISTS `diary_bookmarks` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_diary` int(11) DEFAULT '0',
`id_user` int(11) DEFAULT '0',
`name`
varchar(100) DEFAULT 'no_name',
`time` int(11) DEFAULT '0',
`private`
set('0','1') DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT
CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `diary_cmpl` (
`id` int(11) NOT
NULL AUTO_INCREMENT,
`type`
enum('leks','reklama','oskorb','prop','bessmsl','other') NOT NULL,
`time`
int(11) NOT NULL,
`subject` enum('komm','diary') NOT NULL,
`id_subject`
int(11) DEFAULT '0',
`id_user` int(11) DEFAULT '0',
`id_resh` int(11)
DEFAULT '0',
`ok` enum('0','1') DEFAULT '0',
`msg` varchar(10024) NOT
NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE
TABLE IF NOT EXISTS `diary_dl` (
`id_ank` int(11) DEFAULT '0',
`id_user` int(11) DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE
TABLE IF NOT EXISTS `diary_enter` (
`id_diary` int(11) DEFAULT '0',
`id_user` int(11) DEFAULT '0',
`type` enum('dostyp','18') DEFAULT
'dostyp'
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS
`diary_files` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_diary`
int(11) DEFAULT '0',
`type` enum('photo','file') DEFAULT NULL,
`id_photo_local` int(11) DEFAULT NULL,
`id_file_local` int(11) DEFAULT
NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE
TABLE IF NOT EXISTS `diary_komm` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_user` int(11) NOT NULL,
`id_diary` int(11) NOT NULL,
`time`
int(11) NOT NULL,
`msg` varchar(10024) NOT NULL,
`id_otvet` int(11)
DEFAULT NULL,
`id_otvet_msg` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `msg` (`msg`(333))
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE
IF NOT EXISTS `diary_komm_wrote` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_diary` int(11) DEFAULT '0',
`id_user` int(11) DEFAULT '0',
PRIMARY
KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT
EXISTS `diary_poll` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_diary`
int(11) NOT NULL,
`num` int(11) NOT NULL,
`var` varchar(512) CHARACTER
SET utf8 NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT
CHARSET=cp1251;
CREATE TABLE IF NOT EXISTS `diary_pollen` (
`id` int(11)
NOT NULL AUTO_INCREMENT,
`id_diary` int(11) NOT NULL,
`id_user` int(11)
NOT NULL,
`id_var` int(11) NOT NULL,
`time` int(11) NOT NULL,
PRIMARY
KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=cp1251;
CREATE TABLE IF NOT
EXISTS `diary_tags` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_user`
int(11) DEFAULT '0',
`name` varchar(60) DEFAULT NULL,
PRIMARY KEY
(`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS
`diary_visited` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`time` int(11)
NOT NULL,
`id_diary` int(11) DEFAULT '0',
`id_user` int(11) DEFAULT
'0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;