Файл: tables.sql
Строк: 80
CREATE TABLE `forum` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`type`
enum('forum','razdel','tema') NOT NULL,
`new_thems` enum('all','admods')
NOT NULL,
`time` int(11) NOT NULL,
`mother` int(11) DEFAULT '0',
`id_user` int(11) DEFAULT '1',
`id_comm` int(11) DEFAULT '0',
`name`
varchar(1000) NOT NULL,
`count` varchar(100) NOT NULL,
`text`
varchar(100000) NOT NULL,
`close` enum('0','1') DEFAULT '0',
`close_id_user` enum('0','1') DEFAULT '0',
`last_id_user` int(11) DEFAULT
'0',
`last_time` int(11) DEFAULT '0',
`time_obnov` int(11) DEFAULT
'0',
`c_k_for_moder` int(11) DEFAULT '0',
`c_k_for_user` int(11)
DEFAULT '0',
`opros` enum('0','1') DEFAULT '0',
`up`
enum('0','1','2','3','4','5','6','7','8','9','10') default '0',
PRIMARY
KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=31 DEFAULT CHARSET=utf8
AUTO_INCREMENT=31 ;
CREATE TABLE IF NOT EXISTS `forum_komm` (
`id`
int(11) NOT NULL auto_increment,
`id_them` int(11) NOT NULL,
`id_user`
int(11) NOT NULL,
`time` int(11) NOT NULL,
`msg` varchar(1024) NOT
NULL,
`sistem` enum('0','1') DEFAULT '0',
`skrit` enum('0','1') DEFAULT
'0',
`skrit_id_user` int(11) DEFAULT '0',
`who_moved` int(11) DEFAULT
'0',
`razdel_at` int(11) DEFAULT '0',
`razdel_to` int(11) DEFAULT '0',
`id_otvet` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `id_user`
(`id_user`),
KEY `time` (`time`),
KEY `id_them` (`id_them`),
FULLTEXT
KEY `msg` (`msg`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE
`forum_komm_cmpl` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`type`
enum('leks','reklama','oskorb','prop','bessmsl','other') NOT NULL,
`time` int(11) NOT NULL,
`id_komm` int(11) DEFAULT '0',
`id_user`
int(11) DEFAULT '0',
`id_resh` int(11) DEFAULT '0',
`ok` enum('0','1')
DEFAULT '0',
`msg` varchar(1024) NOT NULL,
PRIMARY KEY (`id`)
)
ENGINE=MyISAM AUTO_INCREMENT=31 DEFAULT CHARSET=utf8 AUTO_INCREMENT=31
;
CREATE TABLE `forum_them_cmpl` (
`id` int(11) NOT NULL
AUTO_INCREMENT,
`type`
enum('leks','reklama','oskorb','prop','bessmsl','other') NOT NULL,
`time` int(11) NOT NULL,
`id_them` int(11) DEFAULT '0',
`id_user`
int(11) DEFAULT '0',
`id_resh` int(11) default '0',
`ok` enum('0','1')
DEFAULT '0',
`msg` varchar(1024) NOT NULL,
PRIMARY KEY (`id`)
)
ENGINE=MyISAM AUTO_INCREMENT=31 DEFAULT CHARSET=utf8 AUTO_INCREMENT=31
;
CREATE TABLE `forum_komm_cmpl` (
`id` int(11) NOT NULL
AUTO_INCREMENT,
`type`
enum('leks','reklama','oskorb','prop','bessmsl','other') NOT NULL,
`time` int(11) NOT NULL,
`id_komm` int(11) DEFAULT '0',
`id_user`
int(11) DEFAULT '0',
`id_resh` int(11) DEFAULT '0',
`ok` enum('0','1')
DEFAULT '0',
`msg` varchar(1024) NOT NULL,
PRIMARY KEY (`id`)
)
ENGINE=MyISAM AUTO_INCREMENT=31 DEFAULT CHARSET=utf8 AUTO_INCREMENT=31
;
CREATE TABLE `forum_them_visited` (
`id` int(11) NOT NULL
AUTO_INCREMENT,
`time` int(11) NOT NULL,
`id_them` int(11) DEFAULT
'0',
`id_user` int(11) DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM
AUTO_INCREMENT=31 DEFAULT CHARSET=utf8 AUTO_INCREMENT=31 ;
CREATE TABLE
`forum_them_komm` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_them`
int(11) DEFAULT '0',
`id_user` int(11) DEFAULT '0',
`sled`
enum('1','0') DEFAULT '1',
PRIMARY KEY (`id`)
) ENGINE=MyISAM
AUTO_INCREMENT=31 DEFAULT CHARSET=utf8 AUTO_INCREMENT=31 ;
CREATE TABLE IF
NOT EXISTS `forum_opros` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_them` 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 AUTO_INCREMENT=19 ;
CREATE TABLE IF NOT EXISTS
`forum_oprosen` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_them`
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 AUTO_INCREMENT=4 ;
UPDATE `user` SET `level` =
"4",
`group_access` = "15" WHERE `id` = 3 LIMIT
1;
CREATE TABLE `forum_bookmarks` (
`id` int(11) NOT NULL
AUTO_INCREMENT,
`id_them` int(11) DEFAULT '0',
`id_user` int(11)
DEFAULT '0',
`name` varchar(50) DEFAULT 'no_name', `time` int(11)
DEFAULT '0',
`private` set('0','1') DEFAULT '0',
PRIMARY KEY (`id`)
)
ENGINE=MyISAM AUTO_INCREMENT=31 DEFAULT CHARSET=utf8 AUTO_INCREMENT=31
;
ALTER TABLE `user` ADD `do_cmpl` ENUM('1','0') DEFAULT '1';