Файл: base.sql
Строк: 84
CREATE TABLE IF NOT EXISTS `banned` (
`id` bigint(100) NOT NULL
AUTO_INCREMENT,
`useragent` varchar(50) NOT NULL,
`userip`
varchar(15) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT
CHARSET=utf8 AUTO_INCREMENT=1 ;
CREATE TABLE IF NOT EXISTS `forums` (
`id` bigint(100) NOT NULL AUTO_INCREMENT,
`title` varchar(50) NOT
NULL,
`description` varchar(100) NOT NULL,
`position` int(3) NOT NULL
DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8
AUTO_INCREMENT=1 ;
CREATE TABLE IF NOT EXISTS `invites` (
`id`
bigint(100) NOT NULL AUTO_INCREMENT,
`user` bigint(100) NOT NULL,
`code` varchar(15) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM
DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
CREATE TABLE IF NOT EXISTS
`language` (
`id` bigint(100) NOT NULL AUTO_INCREMENT,
`name`
varchar(60) NOT NULL,
`file` varchar(60) NOT NULL,
PRIMARY KEY
(`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;
INSERT
INTO `language` (`id`, `name`, `file`) VALUES
(1, 'Русский',
'ru'),
(2, 'Английский', 'en'),
(3, 'Боснийский',
'bs');
CREATE TABLE IF NOT EXISTS `online` (
`id` bigint(100) NOT
NULL AUTO_INCREMENT,
`user` bigint(100) NOT NULL,
`where`
varchar(100) NOT NULL,
`time` int(10) NOT NULL,
PRIMARY KEY (`id`)
)
ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
CREATE TABLE IF
NOT EXISTS `posts` (
`id` bigint(100) NOT NULL AUTO_INCREMENT,
`thread` bigint(100) NOT NULL,
`post` varchar(5000) NOT NULL,
`poster` bigint(100) NOT NULL,
`date` int(10) NOT NULL,
PRIMARY KEY
(`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
CREATE
TABLE IF NOT EXISTS `private` (
`id` bigint(100) NOT NULL
AUTO_INCREMENT,
`from` bigint(100) NOT NULL,
`to` bigint(100) NOT
NULL,
`date` int(10) NOT NULL,
`message` varchar(5000) NOT NULL
DEFAULT '',
`read` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY
(`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
CREATE
TABLE IF NOT EXISTS `recover` (
`id` bigint(100) NOT NULL
AUTO_INCREMENT,
`user` bigint(100) NOT NULL,
`code` varchar(15) NOT
NULL,
`date` int(10) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM
DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
CREATE TABLE IF NOT EXISTS
`settings` (
`id` bigint(100) NOT NULL AUTO_INCREMENT,
`copy`
varchar(80) DEFAULT '0',
`lang` int(2) DEFAULT '0',
`sitename`
varchar(60) DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT
CHARSET=utf8 AUTO_INCREMENT=2 ;
INSERT INTO `settings` (`id`, `copy`,
`lang`, `sitename`) VALUES
(1, '2014', 1, 'MySite');
CREATE TABLE IF
NOT EXISTS `shoutbox` (
`id` bigint(100) NOT NULL AUTO_INCREMENT,
`user` bigint(100) NOT NULL,
`message` varchar(5000) NOT NULL,
`date`
int(10) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT
CHARSET=utf8 AUTO_INCREMENT=2 ;
INSERT INTO `shoutbox` (`id`, `user`,
`message`, `date`) VALUES
(1, 1, 'Krimos Beta!', 1299955933);
CREATE
TABLE IF NOT EXISTS `threads` (
`id` bigint(100) NOT NULL
AUTO_INCREMENT,
`forum` bigint(100) NOT NULL,
`title` varchar(30) NOT
NULL,
`post` varchar(5000) NOT NULL,
`poster` bigint(100) NOT NULL,
`date` int(10) NOT NULL,
`lastpost` int(10) NOT NULL,
`pinned`
tinyint(1) NOT NULL,
`locked` tinyint(1) NOT NULL,
PRIMARY KEY
(`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
CREATE
TABLE IF NOT EXISTS `users` (
`id` bigint(100) NOT NULL
AUTO_INCREMENT,
`username` varchar(25) NOT NULL,
`password`
varchar(60) NOT NULL,
`email` varchar(30) NOT NULL,
`date` int(10)
NOT NULL,
`useragent` varchar(150) NOT NULL,
`userip` varchar(15) NOT
NULL,
`status` tinyint(1) NOT NULL DEFAULT '1',
`banned` tinyint(1)
NOT NULL DEFAULT '0',
`approved` tinyint(1) NOT NULL DEFAULT '0',
`bantime` int(10) NOT NULL,
`lang` int(2) DEFAULT '0',
PRIMARY KEY
(`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
INSERT
INTO `users` (`id`, `username`, `password`, `email`, `date`, `useragent`,
`userip`, `status`, `banned`, `approved`, `bantime`, `lang`) VALUES
(1,
'admin', 'c3284d0f94606de1fd2af172aba15bf3', 'admin@mysite.com',
1299955933, 'Opera/9.80 (Windows NT 6.2) Presto/2.12.388 Version/12.17',
'127.0.0.1', 3, 0, 1, 0, 1);