Merge pull request #37 from MrPetovan/master

Updated dfrndir.sql
This commit is contained in:
Tobias Diekershoff 2017-11-26 17:17:22 +01:00 committed by GitHub
commit bbe2fca6ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 81 additions and 56 deletions

View File

@ -13,11 +13,11 @@ SET time_zone = "+00:00";
-- --
CREATE TABLE IF NOT EXISTS `flag` ( CREATE TABLE IF NOT EXISTS `flag` (
`id` int(11) NOT NULL, `id` int(11) NOT NULL,
`pid` int(11) NOT NULL, `pid` int(11) NOT NULL,
`reason` int(11) NOT NULL, `reason` int(11) NOT NULL,
`total` int(11) NOT NULL DEFAULT '0' `total` int(11) NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=utf8; ) DEFAULT CHARSET=utf8;
-- -------------------------------------------------------- -- --------------------------------------------------------
@ -26,11 +26,11 @@ CREATE TABLE IF NOT EXISTS `flag` (
-- --
CREATE TABLE IF NOT EXISTS `photo` ( CREATE TABLE IF NOT EXISTS `photo` (
`id` int(10) unsigned NOT NULL, `id` int(10) UNSIGNED NOT NULL,
`profile-id` int(11) NOT NULL, `profile-id` int(11) NOT NULL,
`data` mediumblob NOT NULL, `data` mediumblob NOT NULL,
`score` float NOT NULL DEFAULT '0' `score` float NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=utf8; ) DEFAULT CHARSET=utf8;
-- -------------------------------------------------------- -- --------------------------------------------------------
@ -39,7 +39,7 @@ CREATE TABLE IF NOT EXISTS `photo` (
-- --
CREATE TABLE IF NOT EXISTS `profile` ( CREATE TABLE IF NOT EXISTS `profile` (
`id` int(11) NOT NULL, `id` int(11) NOT NULL,
`name` char(255) NOT NULL, `name` char(255) NOT NULL,
`nurl` char(255) NOT NULL, `nurl` char(255) NOT NULL,
`comm` tinyint(1) NOT NULL DEFAULT '0', `comm` tinyint(1) NOT NULL DEFAULT '0',
@ -51,6 +51,7 @@ CREATE TABLE IF NOT EXISTS `profile` (
`homepage` char(255) NOT NULL, `homepage` char(255) NOT NULL,
`photo` char(255) NOT NULL, `photo` char(255) NOT NULL,
`tags` mediumtext NOT NULL, `tags` mediumtext NOT NULL,
`available` tinyint(1) NOT NULL DEFAULT '1',
`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`censored` tinyint(4) NOT NULL DEFAULT '0' `censored` tinyint(4) NOT NULL DEFAULT '0'
@ -63,11 +64,11 @@ CREATE TABLE IF NOT EXISTS `profile` (
-- --
CREATE TABLE IF NOT EXISTS `session` ( CREATE TABLE IF NOT EXISTS `session` (
`id` bigint(20) unsigned NOT NULL, `id` bigint(20) UNSIGNED NOT NULL,
`sid` char(255) NOT NULL, `sid` char(255) NOT NULL,
`data` text NOT NULL, `data` text NOT NULL,
`expire` int(10) unsigned NOT NULL `expire` int(10) UNSIGNED NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8; ) DEFAULT CHARSET=utf8;
-- -------------------------------------------------------- -- --------------------------------------------------------
@ -76,7 +77,7 @@ CREATE TABLE IF NOT EXISTS `session` (
-- --
CREATE TABLE IF NOT EXISTS `site` ( CREATE TABLE IF NOT EXISTS `site` (
`id` int(11) NOT NULL, `id` int(11) NOT NULL,
`name` char(255) NOT NULL, `name` char(255) NOT NULL,
`url` char(255) NOT NULL, `url` char(255) NOT NULL,
`version` char(16) NOT NULL, `version` char(16) NOT NULL,
@ -86,7 +87,7 @@ CREATE TABLE IF NOT EXISTS `site` (
`admin_name` char(255) NOT NULL, `admin_name` char(255) NOT NULL,
`admin_profile` char(255) NOT NULL, `admin_profile` char(255) NOT NULL,
`updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' `updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=MyISAM DEFAULT CHARSET=utf8; ) DEFAULT CHARSET=utf8;
-- -------------------------------------------------------- -- --------------------------------------------------------
@ -95,7 +96,7 @@ CREATE TABLE IF NOT EXISTS `site` (
-- --
CREATE TABLE IF NOT EXISTS `site-health` ( CREATE TABLE IF NOT EXISTS `site-health` (
`id` int(10) unsigned NOT NULL, `id` int(10) UNSIGNED NOT NULL,
`base_url` varchar(255) NOT NULL, `base_url` varchar(255) NOT NULL,
`effective_base_url` varchar(255) DEFAULT NULL, `effective_base_url` varchar(255) DEFAULT NULL,
`health_score` int(11) NOT NULL DEFAULT '0', `health_score` int(11) NOT NULL DEFAULT '0',
@ -113,7 +114,7 @@ CREATE TABLE IF NOT EXISTS `site-health` (
`admin_profile` varchar(255) DEFAULT NULL, `admin_profile` varchar(255) DEFAULT NULL,
`ssl_state` bit(1) DEFAULT NULL, `ssl_state` bit(1) DEFAULT NULL,
`ssl_grade` varchar(3) DEFAULT NULL `ssl_grade` varchar(3) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8; ) DEFAULT CHARSET=utf8;
-- -------------------------------------------------------- -- --------------------------------------------------------
@ -122,11 +123,11 @@ CREATE TABLE IF NOT EXISTS `site-health` (
-- --
CREATE TABLE IF NOT EXISTS `site-probe` ( CREATE TABLE IF NOT EXISTS `site-probe` (
`id` int(10) unsigned NOT NULL, `id` int(10) UNSIGNED NOT NULL,
`site_health_id` int(10) unsigned NOT NULL, `site_health_id` int(10) UNSIGNED NOT NULL,
`dt_performed` datetime NOT NULL, `dt_performed` datetime NOT NULL,
`request_time` int(10) unsigned NOT NULL `request_time` int(10) UNSIGNED NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8; ) DEFAULT CHARSET=utf8;
-- -------------------------------------------------------- -- --------------------------------------------------------
@ -135,14 +136,14 @@ CREATE TABLE IF NOT EXISTS `site-probe` (
-- --
CREATE TABLE IF NOT EXISTS `site-scrape` ( CREATE TABLE IF NOT EXISTS `site-scrape` (
`id` int(10) unsigned NOT NULL, `id` int(10) UNSIGNED NOT NULL,
`site_health_id` int(10) unsigned NOT NULL, `site_health_id` int(10) UNSIGNED NOT NULL,
`dt_performed` datetime NOT NULL, `dt_performed` datetime NOT NULL,
`request_time` int(10) unsigned NOT NULL, `request_time` int(10) UNSIGNED NOT NULL,
`scrape_time` int(10) unsigned NOT NULL, `scrape_time` int(10) UNSIGNED NOT NULL,
`photo_time` int(10) unsigned NOT NULL, `photo_time` int(10) UNSIGNED NOT NULL,
`total_time` int(10) unsigned NOT NULL `total_time` int(10) UNSIGNED NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8; ) DEFAULT CHARSET=utf8;
-- -------------------------------------------------------- -- --------------------------------------------------------
@ -152,7 +153,7 @@ CREATE TABLE IF NOT EXISTS `site-scrape` (
CREATE TABLE IF NOT EXISTS `sync-pull-queue` ( CREATE TABLE IF NOT EXISTS `sync-pull-queue` (
`url` varchar(255) NOT NULL `url` varchar(255) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8; ) DEFAULT CHARSET=utf8;
-- -------------------------------------------------------- -- --------------------------------------------------------
@ -162,7 +163,7 @@ CREATE TABLE IF NOT EXISTS `sync-pull-queue` (
CREATE TABLE IF NOT EXISTS `sync-push-queue` ( CREATE TABLE IF NOT EXISTS `sync-push-queue` (
`url` varchar(255) NOT NULL `url` varchar(255) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8; ) DEFAULT CHARSET=utf8;
-- -------------------------------------------------------- -- --------------------------------------------------------
@ -174,8 +175,8 @@ CREATE TABLE IF NOT EXISTS `sync-targets` (
`base_url` varchar(255) NOT NULL, `base_url` varchar(255) NOT NULL,
`pull` bit(1) NOT NULL DEFAULT b'0', `pull` bit(1) NOT NULL DEFAULT b'0',
`push` bit(1) NOT NULL DEFAULT b'1', `push` bit(1) NOT NULL DEFAULT b'1',
`dt_last_pull` bigint(20) unsigned DEFAULT NULL `dt_last_pull` bigint(20) UNSIGNED DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8; ) DEFAULT CHARSET=utf8;
-- -------------------------------------------------------- -- --------------------------------------------------------
@ -186,7 +187,7 @@ CREATE TABLE IF NOT EXISTS `sync-targets` (
CREATE TABLE IF NOT EXISTS `sync-timestamps` ( CREATE TABLE IF NOT EXISTS `sync-timestamps` (
`url` varchar(255) NOT NULL, `url` varchar(255) NOT NULL,
`modified` datetime NOT NULL `modified` datetime NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8; ) DEFAULT CHARSET=utf8;
-- -------------------------------------------------------- -- --------------------------------------------------------
@ -195,10 +196,10 @@ CREATE TABLE IF NOT EXISTS `sync-timestamps` (
-- --
CREATE TABLE IF NOT EXISTS `tag` ( CREATE TABLE IF NOT EXISTS `tag` (
`id` int(11) NOT NULL, `id` int(11) NOT NULL,
`term` char(255) NOT NULL, `term` char(255) NOT NULL,
`nurl` char(255) NOT NULL `nurl` char(255) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8; ) DEFAULT CHARSET=utf8;
-- -------------------------------------------------------- -- --------------------------------------------------------
@ -207,10 +208,10 @@ CREATE TABLE IF NOT EXISTS `tag` (
-- --
CREATE TABLE IF NOT EXISTS `user` ( CREATE TABLE IF NOT EXISTS `user` (
`uid` int(11) NOT NULL, `uid` int(11) NOT NULL,
`email` char(255) NOT NULL, `email` char(255) NOT NULL,
`password` char(255) NOT NULL `password` char(255) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8; ) DEFAULT CHARSET=utf8;
-- --
-- Indexes for dumped tables -- Indexes for dumped tables
@ -220,85 +221,109 @@ CREATE TABLE IF NOT EXISTS `user` (
-- Indexes for table `flag` -- Indexes for table `flag`
-- --
ALTER TABLE `flag` ALTER TABLE `flag`
ADD PRIMARY KEY (`id`); ADD PRIMARY KEY (`id`);
-- --
-- Indexes for table `photo` -- Indexes for table `photo`
-- --
ALTER TABLE `photo` ALTER TABLE `photo`
ADD PRIMARY KEY (`id`); ADD PRIMARY KEY (`id`);
-- --
-- Indexes for table `profile` -- Indexes for table `profile`
-- --
ALTER TABLE `profile` ALTER TABLE `profile`
ADD PRIMARY KEY (`id`), ADD KEY `name` (`name`), ADD KEY `nurl` (`nurl`), ADD KEY `comm` (`comm`), ADD KEY `pdesc` (`pdesc`), ADD KEY `locality` (`locality`), ADD KEY `region` (`region`), ADD KEY `country-name` (`country-name`), ADD KEY `homepage` (`homepage`), ADD FULLTEXT KEY `tags` (`tags`), ADD FULLTEXT KEY `profile-ft` (`name`,`pdesc`,`homepage`,`locality`,`region`,`country-name`,`tags`); ADD PRIMARY KEY (`id`),
ADD KEY `name` (`name`),
ADD KEY `nurl` (`nurl`),
ADD KEY `comm` (`comm`),
ADD KEY `pdesc` (`pdesc`),
ADD KEY `locality` (`locality`),
ADD KEY `region` (`region`),
ADD KEY `country-name` (`country-name`),
ADD KEY `homepage` (`homepage`);
ALTER TABLE `profile` ADD FULLTEXT KEY `tags` (`tags`);
ALTER TABLE `profile` ADD FULLTEXT KEY `profile-ft` (`name`,`pdesc`,`homepage`,`locality`,`region`,`country-name`,`tags`);
-- --
-- Indexes for table `session` -- Indexes for table `session`
-- --
ALTER TABLE `session` ALTER TABLE `session`
ADD PRIMARY KEY (`id`), ADD KEY `sid` (`sid`), ADD KEY `expire` (`expire`); ADD PRIMARY KEY (`id`),
ADD KEY `sid` (`sid`),
ADD KEY `expire` (`expire`);
-- --
-- Indexes for table `site` -- Indexes for table `site`
-- --
ALTER TABLE `site` ALTER TABLE `site`
ADD PRIMARY KEY (`id`); ADD PRIMARY KEY (`id`);
-- --
-- Indexes for table `site-health` -- Indexes for table `site-health`
-- --
ALTER TABLE `site-health` ALTER TABLE `site-health`
ADD PRIMARY KEY (`id`), ADD KEY `base_url` (`base_url`), ADD KEY `health_score` (`health_score`), ADD KEY `dt_last_seen` (`dt_last_seen`); ADD PRIMARY KEY (`id`),
ADD KEY `base_url` (`base_url`),
ADD KEY `health_score` (`health_score`),
ADD KEY `dt_last_seen` (`dt_last_seen`);
-- --
-- Indexes for table `site-probe` -- Indexes for table `site-probe`
-- --
ALTER TABLE `site-probe` ALTER TABLE `site-probe`
ADD PRIMARY KEY (`id`), ADD KEY `site_health_id` (`site_health_id`), ADD KEY `dt_performed` (`dt_performed`); ADD PRIMARY KEY (`id`),
ADD KEY `site_health_id` (`site_health_id`),
ADD KEY `dt_performed` (`dt_performed`);
-- --
-- Indexes for table `site-scrape` -- Indexes for table `site-scrape`
-- --
ALTER TABLE `site-scrape` ALTER TABLE `site-scrape`
ADD PRIMARY KEY (`id`), ADD KEY `site_health_id` (`site_health_id`), ADD KEY `dt_performed` (`dt_performed`); ADD PRIMARY KEY (`id`),
ADD KEY `site_health_id` (`site_health_id`),
ADD KEY `dt_performed` (`dt_performed`);
-- --
-- Indexes for table `sync-pull-queue` -- Indexes for table `sync-pull-queue`
-- --
ALTER TABLE `sync-pull-queue` ALTER TABLE `sync-pull-queue`
ADD PRIMARY KEY (`url`); ADD PRIMARY KEY (`url`);
-- --
-- Indexes for table `sync-push-queue` -- Indexes for table `sync-push-queue`
-- --
ALTER TABLE `sync-push-queue` ALTER TABLE `sync-push-queue`
ADD PRIMARY KEY (`url`); ADD PRIMARY KEY (`url`);
-- --
-- Indexes for table `sync-targets` -- Indexes for table `sync-targets`
-- --
ALTER TABLE `sync-targets` ALTER TABLE `sync-targets`
ADD PRIMARY KEY (`base_url`), ADD KEY `push` (`push`), ADD KEY `pull` (`pull`); ADD PRIMARY KEY (`base_url`),
ADD KEY `push` (`push`),
ADD KEY `pull` (`pull`);
-- --
-- Indexes for table `sync-timestamps` -- Indexes for table `sync-timestamps`
-- --
ALTER TABLE `sync-timestamps` ALTER TABLE `sync-timestamps`
ADD PRIMARY KEY (`url`), ADD KEY `modified` (`modified`); ADD PRIMARY KEY (`url`),
ADD KEY `modified` (`modified`);
-- --
-- Indexes for table `tag` -- Indexes for table `tag`
-- --
ALTER TABLE `tag` ALTER TABLE `tag`
ADD PRIMARY KEY (`id`), ADD KEY `term` (`term`), ADD KEY `nurl` (`nurl`); ADD PRIMARY KEY (`id`),
ADD KEY `term` (`term`),
ADD KEY `nurl` (`nurl`);
-- --
-- Indexes for table `user` -- Indexes for table `user`
-- --
ALTER TABLE `user` ALTER TABLE `user`
ADD PRIMARY KEY (`uid`); ADD PRIMARY KEY (`uid`);
-- --
-- AUTO_INCREMENT for dumped tables -- AUTO_INCREMENT for dumped tables
@ -308,49 +333,49 @@ ALTER TABLE `user`
-- AUTO_INCREMENT for table `flag` -- AUTO_INCREMENT for table `flag`
-- --
ALTER TABLE `flag` ALTER TABLE `flag`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=6; MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
-- --
-- AUTO_INCREMENT for table `photo` -- AUTO_INCREMENT for table `photo`
-- --
ALTER TABLE `photo` ALTER TABLE `photo`
MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=1486; MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
-- --
-- AUTO_INCREMENT for table `profile` -- AUTO_INCREMENT for table `profile`
-- --
ALTER TABLE `profile` ALTER TABLE `profile`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=1488; MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
-- --
-- AUTO_INCREMENT for table `session` -- AUTO_INCREMENT for table `session`
-- --
ALTER TABLE `session` ALTER TABLE `session`
MODIFY `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=104; MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
-- --
-- AUTO_INCREMENT for table `site` -- AUTO_INCREMENT for table `site`
-- --
ALTER TABLE `site` ALTER TABLE `site`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
-- --
-- AUTO_INCREMENT for table `site-health` -- AUTO_INCREMENT for table `site-health`
-- --
ALTER TABLE `site-health` ALTER TABLE `site-health`
MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=1513; MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
-- --
-- AUTO_INCREMENT for table `site-probe` -- AUTO_INCREMENT for table `site-probe`
-- --
ALTER TABLE `site-probe` ALTER TABLE `site-probe`
MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=6651; MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
-- --
-- AUTO_INCREMENT for table `site-scrape` -- AUTO_INCREMENT for table `site-scrape`
-- --
ALTER TABLE `site-scrape` ALTER TABLE `site-scrape`
MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=21048; MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
-- --
-- AUTO_INCREMENT for table `tag` -- AUTO_INCREMENT for table `tag`
-- --
ALTER TABLE `tag` ALTER TABLE `tag`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2322; MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
-- --
-- AUTO_INCREMENT for table `user` -- AUTO_INCREMENT for table `user`
-- --
ALTER TABLE `user` ALTER TABLE `user`
MODIFY `uid` int(11) NOT NULL AUTO_INCREMENT; MODIFY `uid` int(11) NOT NULL AUTO_INCREMENT;