62 lines
3.4 KiB
SQL
62 lines
3.4 KiB
SQL
SET NAMES utf8;
|
|
SET time_zone = '+00:00';
|
|
SET foreign_key_checks = 0;
|
|
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
|
|
SET NAMES utf8mb4;
|
|
DROP DATABASE IF EXISTS `f0ck`;
|
|
CREATE DATABASE `f0ck` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci */;
|
|
USE `f0ck`;
|
|
DROP TABLE IF EXISTS `cfg`;
|
|
CREATE TABLE `cfg` (
|
|
`class` set('irc','main','websrv') COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
`key` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
`value` text COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
`type` set('string','int','bool','json') COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
UNIQUE KEY `class_key` (`class`,`key`)
|
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
INSERT INTO `cfg` (`class`, `key`, `value`, `type`) VALUES
|
|
('main', 'allowedMimes', '{\r\n \"image/png\": \"png\",\r\n \"video/webm\": \"webm\",\r\n \"image/gif\": \"gif\",\r\n \"image/jpeg\": \"jpg\",\r\n \"video/mp4\": \"mp4\",\r\n \"video/quicktime\": \"mov\",\r\n \"audio/mpeg\": \"mp3\",\r\n \"audio/ogg\": \"ogg\"\r\n}', 'json'),
|
|
('main', 'disallowedHosts', '[\r\n \"f0ck.me\"\r\n]', 'json'),
|
|
('main', 'minRes', '500', 'int'),
|
|
('main', 'maxFileSize', '31457280', 'int'),
|
|
('main', 'level', '{\r\n \"~\": 80,\r\n \"&\": 70,\r\n \"@\": 60,\r\n \"%\": 50,\r\n \"+\": 10,\r\n \"\": 0\r\n}', 'json'),
|
|
('main', 'debug', 'false', 'bool'),
|
|
('main', 'debugchannel', '#f0ck', 'string'),
|
|
('main', 'scclientid', '', 'string'),
|
|
('main', 'url', 'http://', 'string'),
|
|
('websrv', 'port', '', 'int'),
|
|
('websrv', 'wlip', '{\r\n \"::ffff:127.0.0.1\": \"\"\r\n}', 'json'),
|
|
('websrv', 'gittoken', '', 'string'),
|
|
('irc', 'irccfg', '[{\r\n \"name\": \"n0xy\",\r\n \"host\": \"\",\r\n \"port\": \"\",\r\n \"ssl\": \"1\",\r\n \"ssl_allow_invalid\": \"1\",\r\n \"pass\": \"\",\r\n \"nick\": \"f0ckyou\",\r\n \"username\": \"\",\r\n \"realname\": \"f0ck\",\r\n \"throttling\": false\r\n}]', 'json');
|
|
DROP TABLE IF EXISTS `items`;
|
|
CREATE TABLE `items` (
|
|
`id` int(50) NOT NULL AUTO_INCREMENT,
|
|
`src` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'src-Link',
|
|
`dest` varchar(40) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'filename',
|
|
`mime` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
`size` int(100) NOT NULL,
|
|
`checksum` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
`username` varchar(40) COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
`userchannel` varchar(40) COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
`usernetwork` varchar(40) COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
`stamp` int(10) NOT NULL,
|
|
`active` tinyint(1) NOT NULL,
|
|
`thumb` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
PRIMARY KEY (`id`)
|
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
DROP TABLE IF EXISTS `user`;
|
|
CREATE TABLE `user` (
|
|
`id` int(50) NOT NULL AUTO_INCREMENT,
|
|
`account` varchar(40) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`level` int(3) NOT NULL,
|
|
`network` varchar(40) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
PRIMARY KEY (`id`)
|
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
DROP TABLE IF EXISTS `vars`;
|
|
CREATE TABLE `vars` (
|
|
`key` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`value` text COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
`channel` varchar(40) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`network` varchar(40) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
UNIQUE KEY `key` (`key`(20),`channel`(20),`network`(20))
|
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |