1)
--
-- Структура таблицы `USERS`
--
create table `users` (
`id` int(11) not null,
`sn` varchar(20) default null,
`nick` varchar(255) default null,
`localnick` varchar(255) default null,
`fname` varchar(255) default null,
`lname` varchar(255) default null,
`email` varchar(255) default null,
`city` varchar(255) default null,
`homepage` varchar(255) default null,
`gender` int(11) default null,
`birthyear` int(11) default null,
`birthmonth` int(11) default null,
`birthday` int(11) default null,
`age` int(11) default null,
`country` int(11) default null,
`language` int(11) default null,
`state` int(11) default null,
`basesn` varchar(20) default null,
`createtime` timestamp not null default current_timestamp on update current_timestamp,
`room` int(11) default null,
`lastkick` timestamp not null default '0000-00-00 00:00:00',
primary key (`id`)
);
-- --------------------------------------------------------
--
-- Структура таблицы `ads`
--
CREATE TABLE `ads` (
`id` int(11) NOT NULL auto_increment,
`txt` text NOT NULL,
`enable` int(1) NOT NULL default '1',
`note` text,
PRIMARY KEY (`id`)
);
-- --------------------------------------------------------
--
-- Структура таблицы `ads_log`
--
CREATE TABLE `ads_log` (
`ads_id` int(11) NOT NULL,
`time` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`uin` varchar(20) NOT NULL
);
-- --------------------------------------------------------
--
-- Структура таблицы `aneks`
--
CREATE TABLE `aneks` (
`id` int(11) NOT NULL,
`text` text NOT NULL,
PRIMARY KEY (`id`)
);
-- --------------------------------------------------------
--
-- Структура таблицы `aneks_tmp`
--
CREATE TABLE `aneks_tmp` (
`id` int(11) NOT NULL auto_increment,
`text` text,
`uin` varchar(20) default NULL,
PRIMARY KEY (`id`)
);
-- --------------------------------------------------------
--
-- Структура таблицы `events`
--
CREATE TABLE `events` (
`id` bigint(20) NOT NULL auto_increment,
`time` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`user_id` int(11) default NULL,
`user_sn` varchar(50) default NULL,
`type` varchar(10) default NULL,
`user_id2` int(11) default NULL,
`user_sn2` varchar(50) default NULL,
`msg` text,
PRIMARY KEY (`id`)
) ;
-- --------------------------------------------------------
--
-- Структура таблицы `log`
--
CREATE TABLE `log` (
`id` bigint(20) NOT NULL auto_increment,
`time` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`user_id` int(11) default NULL,
`user_sn` varchar(50) default NULL,
`type` varchar(10) default NULL,
`msg` text,
`room` int(11) NOT NULL,
PRIMARY KEY (`id`)
);
-- --------------------------------------------------------
--
-- Структура таблицы `sms_log`
--
CREATE TABLE `sms_log` (
`id` int(11) NOT NULL auto_increment,
`num` varchar(10) default NULL,
`operator` varchar(20) default NULL,
`user_id` varchar(20) default NULL,
`cost` float NOT NULL default '0',
`msg` varchar(170) default NULL,
PRIMARY KEY (`id`)
);
-- --------------------------------------------------------
--
-- Структура таблицы `user_props`
--
CREATE TABLE `user_props` (
`user_id` int(11) NOT NULL,
`name` varchar(50) default NULL,
`val` varchar(50) default NULL
);
-- --------------------------------------------------------
--
-- Структура таблицы `rooms`
--
CREATE TABLE `rooms` (
`id` int(11) NOT NULL,
`name` varchar(100) NOT NULL,
`topic` varchar(255) NOT NULL,
`pass` varchar(20) NOT NULL,
`user_id` int(11) NOT NULL,
PRIMARY KEY (`id`)
);
=========================
2)
CREATE TABLE `bash` (
`id` bigint( 20 ) NOT NULL AUTO_INCREMENT ,
`citata` text COLLATE utf8_unicode_ci NOT NULL ,
`title` text COLLATE utf8_unicode_ci,
PRIMARY KEY ( `id` )
) ENGINE = MYISAM DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci;
CREATE TABLE `info` (
`id` bigint(20) NOT NULL auto_increment,
`time` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`user_id` int(11) default NULL,
`user_sn` varchar(50) default NULL,
`type` varchar(10) default NULL,
`user_id2` int(11) default NULL,
`user_sn2` varchar(50) default NULL,
`msg` text,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
ALTER TABLE `users` ADD `lastclosed` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00',
ADD `SP` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00',
ADD `ball` INT( 11 ) NULL ,
ADD `viev` INT( 11 ) NULL ,
ADD `odegd` varchar(255) NOT NULL ,
ADD `giv` varchar(255) NOT NULL ,
ADD `auto` varchar(255) NOT NULL ,
ADD `dom` varchar(255) NOT NULL,
ADD `clansman` INT( 11 ) NULL,
ADD `clangroup` varchar(255) NULL,
ADD `ohran` INT(11) NULL,
ADD `banks` INT(11) default NULL;
ALTER TABLE users ADD `orujie` int(7) NOT NULL default '0';
CREATE TABLE IF NOT EXISTS `victorina` (
`id` int(11) NOT NULL,
`question` varchar(255) NOT NULL,
`answer` varchar(255) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=cp1251;
--
-- Структура таблицы `frends`
--
CREATE TABLE `frends` (
`id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`frend_id` int(11) NOT NULL,
`type` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ;
--
-- Структура таблицы `gift`
--
CREATE TABLE `gift` (
`id` int(11) NOT NULL,
`gift` varchar(255) NOT NULL,
`price` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ;
--
-- Структура таблицы `gift_user`
--
CREATE TABLE `gift_user` (
`id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`user_id2` int(11) NOT NULL,
`gift` varchar(255) NOT NULL,
`text` text(200) NOT NULL,
`time` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ;
--
-- Структура таблицы `clans`
--
CREATE TABLE `clans` (
`id` int(11) NOT NULL,
`leader_clan` int(11) NOT NULL,
`room_clan` int(11) NOT NULL,
`name_clan` varchar(255) NOT NULL,
`ball_clan` int(11) NOT NULL,
`info_clan` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ;
-- --------------------------------------------------------
--
-- Структура таблицы `thing`
--
CREATE TABLE `thing` (
`id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`thing` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ;
CREATE TABLE `demand` (
`id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`frend_id` int(11) NOT NULL,
`type` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ;
CREATE TABLE `weather` (
`id` int(11) NOT NULL auto_increment,
`num` int(11) NOT NULL,
`txt` CHAR(30) NOT NULL,
PRIMARY KEY (`id`)
);