-- phpMyAdmin SQL Dump
-- version 4.0.10
-- http://www.phpmyadmin.net
--
-- Хост: 127.0.0.1:3306
-- Время создания: Фев 28 2014 г., 01:03
-- Версия сервера: 5.5.35-log
-- Версия PHP: 5.3.27

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- База данных: `mkm`
--

-- --------------------------------------------------------

--
-- Структура таблицы `mkm_albums`
--

CREATE TABLE IF NOT EXISTS `mkm_albums` (
  `aid` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `111` int(11) NOT NULL,
  `photo_num` mediumint(9) NOT NULL,
  `comm_num` mediumint(9) NOT NULL,
  `cover` text NOT NULL,
  `descr` text NOT NULL,
  `ahash` text NOT NULL,
  `position` text NOT NULL,
  `adate` varchar(50) NOT NULL,
  `name` varchar(100) NOT NULL,
  `privacy` text NOT NULL,
  `url` text NOT NULL,
  PRIMARY KEY (`aid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Структура таблицы `mkm_attach`
--

CREATE TABLE IF NOT EXISTS `mkm_attach` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `photo` text NOT NULL,
  `ouser_id` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Структура таблицы `mkm_banned`
--

CREATE TABLE IF NOT EXISTS `mkm_banned` (
  `descr` text NOT NULL,
  `date` varchar(50) NOT NULL,
  `always` text NOT NULL,
  `ip` text NOT NULL,
  `id` int(11) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Структура таблицы `mkm_blog`
--

CREATE TABLE IF NOT EXISTS `mkm_blog` (
  `title` varchar(30) NOT NULL,
  `story` text NOT NULL,
  `date` varchar(50) NOT NULL,
  `id` int(11) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Структура таблицы `mkm_city`
--

CREATE TABLE IF NOT EXISTS `mkm_city` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(25) NOT NULL,
  `id_country` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;

--
-- Дамп данных таблицы `mkm_city`
--

INSERT INTO `mkm_city` (`id`, `name`, `id_country`) VALUES
(1, 'New-York', 2),
(2, 'Moscow', 1);

-- --------------------------------------------------------

--
-- Структура таблицы `mkm_country`
--

CREATE TABLE IF NOT EXISTS `mkm_country` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(25) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;

--
-- Дамп данных таблицы `mkm_country`
--

INSERT INTO `mkm_country` (`id`, `name`) VALUES
(1, 'Russia'),
(2, 'USA');

-- --------------------------------------------------------

--
-- Структура таблицы `mkm_fave`
--

CREATE TABLE IF NOT EXISTS `mkm_fave` (
  `user_id` int(11) NOT NULL,
  `fave_id` int(11) NOT NULL,
  `date` date NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Структура таблицы `mkm_friends`
--

CREATE TABLE IF NOT EXISTS `mkm_friends` (
  `user_id` int(11) NOT NULL,
  `from_user_id` int(11) NOT NULL,
  `friend_id` int(11) NOT NULL,
  `friends_date` date NOT NULL,
  `for_user_id` int(11) NOT NULL,
  `following` int(11) NOT NULL,
  `did` int(11) NOT NULL,
  `dname` varchar(50) NOT NULL,
  `ddate` varchar(30) NOT NULL,
  `ddownload_name` varchar(50) NOT NULL,
  `duser_id` int(11) NOT NULL,
  `views` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Структура таблицы `mkm_friends_demands`
--

CREATE TABLE IF NOT EXISTS `mkm_friends_demands` (
  `for_user_id` int(11) NOT NULL,
  `demand_date` int(11) NOT NULL,
  `from_user_id` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Структура таблицы `mkm_im`
--

CREATE TABLE IF NOT EXISTS `mkm_im` (
  `all_msg_num` int(11) NOT NULL,
  `iuser_id` int(11) NOT NULL,
  `im_user_id` int(11) NOT NULL,
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `msg_num` varchar(50) NOT NULL,
  `idate` varchar(50) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Структура таблицы `mkm_invites`
--

CREATE TABLE IF NOT EXISTS `mkm_invites` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `ruid` int(11) NOT NULL,
  `uid` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Структура таблицы `mkm_log`
--

CREATE TABLE IF NOT EXISTS `mkm_log` (
  `ip` varchar(50) NOT NULL,
  `uid` int(11) NOT NULL,
  `browser` text NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Структура таблицы `mkm_mail_tpl`
--

CREATE TABLE IF NOT EXISTS `mkm_mail_tpl` (
  `id` int(11) NOT NULL,
  `text` text NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Структура таблицы `mkm_messages`
--

CREATE TABLE IF NOT EXISTS `mkm_messages` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `text` text NOT NULL,
  `for_user_id` int(11) NOT NULL,
  `pm_read` text NOT NULL,
  `from_user_id` int(11) NOT NULL,
  `folder` text NOT NULL,
  `history_user_id` int(11) NOT NULL,
  `theme` text NOT NULL,
  `date` varchar(25) NOT NULL,
  `attach` varchar(200) NOT NULL,
  `title` text NOT NULL,
  `tell_uid` mediumint(9) NOT NULL,
  `tell_date` varchar(30) NOT NULL,
  `public` varchar(200) NOT NULL,
  `tell_comm` varchar(200) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Структура таблицы `mkm_news`
--

CREATE TABLE IF NOT EXISTS `mkm_news` (
  `action_text` text NOT NULL,
  `action_time` varchar(50) NOT NULL,
  `ac_id` int(11) NOT NULL AUTO_INCREMENT,
  `ac_user_id` int(11) NOT NULL,
  `action_type` tinyint(11) NOT NULL,
  `obj_id` int(11) NOT NULL,
  `author_user_id` int(11) NOT NULL,
  `for_user_id` int(11) NOT NULL,
  `fasts_num` mediumint(11) NOT NULL,
  `title` varchar(50) NOT NULL,
  `photo` int(11) NOT NULL,
  `comments` int(11) NOT NULL,
  PRIMARY KEY (`ac_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Структура таблицы `mkm_photos`
--

CREATE TABLE IF NOT EXISTS `mkm_photos` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `album_id` int(25) NOT NULL,
  `user_id` int(11) NOT NULL,
  `comm_num` mediumint(11) NOT NULL,
  `photo_name` text NOT NULL,
  `date` varchar(50) NOT NULL,
  `position` varchar(200) NOT NULL,
  `descr` text NOT NULL,
  `hash` text NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Структура таблицы `mkm_photos_comments`
--

CREATE TABLE IF NOT EXISTS `mkm_photos_comments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `owner_id` int(11) NOT NULL,
  `album_id` int(11) NOT NULL,
  `pid` int(11) NOT NULL,
  `user_id` mediumint(8) NOT NULL,
  `text` text NOT NULL,
  `date` datetime NOT NULL,
  `hash` varchar(32) NOT NULL,
  `photo_name` varchar(25) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `owner_id` (`owner_id`),
  KEY `album_id` (`album_id`),
  KEY `user_id` (`user_id`),
  KEY `hash` (`hash`),
  KEY `photo_name` (`photo_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Структура таблицы `mkm_report`
--

CREATE TABLE IF NOT EXISTS `mkm_report` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `ruser_id` int(11) NOT NULL,
  `mid` int(11) NOT NULL,
  `act` text NOT NULL,
  `type` text NOT NULL,
  `text` text NOT NULL,
  `date` text NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Структура таблицы `mkm_restore`
--

CREATE TABLE IF NOT EXISTS `mkm_restore` (
  `email` varchar(60) NOT NULL,
  `hash` char(100) NOT NULL,
  `ip` varchar(50) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Структура таблицы `mkm_users`
--

CREATE TABLE IF NOT EXISTS `mkm_users` (
  `user_id` int(11) NOT NULL AUTO_INCREMENT,
  `email` varchar(200) NOT NULL,
  `password` char(50) NOT NULL,
  `name` varchar(25) NOT NULL,
  `lastname` varchar(25) NOT NULL,
  `gender` int(11) NOT NULL,
  `day` int(11) NOT NULL,
  `month` int(11) NOT NULL,
  `year` int(11) NOT NULL,
  `country` varchar(50) NOT NULL,
  `city` varchar(50) NOT NULL,
  `signup_date` varchar(60) NOT NULL,
  `profile_group` smallint(11) NOT NULL,
  `hid` char(100) NOT NULL,
  `country_city` varchar(60) NOT NULL,
  `name_lastname` varchar(25) NOT NULL,
  `birthday` char(11) NOT NULL,
  `privacy` text NOT NULL,
  `avatar` varchar(90) NOT NULL,
  `profile_delete` int(11) NOT NULL,
  `profile_baned` int(11) NOT NULL,
  `wall_num` mediumint(11) NOT NULL,
  `videos_num` mediumint(11) NOT NULL,
  `wall_id` int(11) NOT NULL,
  `messages_num` mediumint(11) NOT NULL,
  `profile_baned_date` varchar(255) NOT NULL,
  `friends_demands` int(11) NOT NULL,
  `lastupdate` int(11) NOT NULL,
  `message_type` int(11) NOT NULL,
  `friends_num` mediumint(11) NOT NULL,
  `following_num` mediumint(11) NOT NULL,
  `albums_num` mediumint(11) NOT NULL,
  `xfields` text NOT NULL,
  `favourites_num` mediumint(11) NOT NULL,
  `blacklist` text NOT NULL,
  `blacklist_num` mediumint(11) NOT NULL,
  `all_liked_users` text NOT NULL,
  `last_visit` varchar(15) NOT NULL,
  `cover_image` varchar(25) NOT NULL,
  `cover_position` varchar(4) NOT NULL,
  `followers_num` int(10) NOT NULL,
  PRIMARY KEY (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Структура таблицы `mkm_videos`
--

CREATE TABLE IF NOT EXISTS `mkm_videos` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `owner_user_id` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `descr` text NOT NULL,
  `video` text NOT NULL,
  `comm_num` mediumint(50) NOT NULL,
  `add_date` varchar(50) NOT NULL,
  `views` int(11) NOT NULL,
  `user_name` varchar(50) NOT NULL,
  `photo_num` mediumint(11) NOT NULL,
  `photo` text NOT NULL,
  `video_privacy` text NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Структура таблицы `mkm_videos_comments`
--

CREATE TABLE IF NOT EXISTS `mkm_videos_comments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `author_user_id` int(11) NOT NULL,
  `text` text NOT NULL,
  `add_date` varchar(20) NOT NULL,
  `video_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Структура таблицы `mkm_wall`
--

CREATE TABLE IF NOT EXISTS `mkm_wall` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `fast_comm_id` int(11) NOT NULL,
  `fasts_num` int(11) NOT NULL,
  `likes_users` text NOT NULL,
  `author_user_id` int(11) NOT NULL,
  `likes_num` mediumint(11) NOT NULL,
  `add_date` varchar(100) NOT NULL,
  `text` text NOT NULL,
  `tell_uid` int(11) NOT NULL,
  `tell_date` int(11) NOT NULL,
  `public` int(11) NOT NULL,
  `attach` text NOT NULL,
  `for_user_id` int(11) NOT NULL,
  `type` text NOT NULL,
  `tell_comm` text NOT NULL,
  `user_id` int(11) NOT NULL,
  `data` varchar(100) NOT NULL,
  `cnt` int(11) NOT NULL,
  `val_wall` text NOT NULL,
  `check_friend` text NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Структура таблицы `mkm_wall_like`
--

CREATE TABLE IF NOT EXISTS `mkm_wall_like` (
  `rec_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `date` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
