Remove combined SQL; Add separate SQL

This commit is contained in:
Matt Nadareski
2016-04-02 21:01:53 -07:00
parent adf6cbe6b8
commit e53faf2b92
9 changed files with 66 additions and 124 deletions

66
scripts/_archive.bat Normal file
View File

@@ -0,0 +1,66 @@
@echo off
REM Set the title of the window
TITLE Archive Files and Folders
REM Set unicode compatibility for odd names
chcp 65001
REM Add 7-zip to the path to make it easier to call
PATH=%PATH%;"C:\Program Files\7-Zip\";"C:\Program Files (x86)\7-Zip\"
REM Set output archive type, with period
set ext=.7z
REM Set if current directory is parsed (true)
set cur=true
REM Set if directories are archived (true)
set sub=false
REM Set if cleanup is done or not (true)
set cleanup=true
REM Set all possible output formats
set outlist=.7z .bz2 .gz .tar .wim .xz .zip
REM Check the extension against known available output formats
for %%O in (%outlist%) do (
if "%ext%"=="%%O" goto ArchiveFiles
)
echo The entered output file type is not valid, use one of the following instead:
echo .7z, .xz, .bz2, .gz, .tar, .zip, .wim
pause
goto EOF
:ArchiveFiles
REM Take care of current folder, if applicable
if "%cur%"=="true" (
echo Processing current folder
for /F "delims=" %%A in ('dir /A-D /B') do (
if not "%%~xA"=="%ext%" if not "%%A"=="%~n0%~x0" if not "%%A"==".." if not "%%A"=="." (
7z.exe a "%%~nA%ext%" "%%A"
if "%cleanup%"=="true" (
echo Deleting %%A
del "%%A"
)
)
)
)
:ArchiveSubfolder
REM Take care of subfolders, if applicable
if "%sub%"=="true" (
echo Processing subfolders
for /F "delims=" %%D in ('dir /AD /B') do (
if not "%%D"==".." if not "%%D"=="." (
echo Moving into %%D
cd "%%D"
7z.exe a "..\%%D%ext%"
echo Going back to root folder
cd ..
if "%cleanup%"=="true" (
echo Deleting %%D
rmdir /S /Q "%%D"
)
)
)
)

BIN
scripts/files.7z Normal file

Binary file not shown.

BIN
scripts/games.7z Normal file

Binary file not shown.

BIN
scripts/init.7z Normal file

Binary file not shown.

View File

@@ -1,124 +0,0 @@
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Mar 08, 2016 at 05:16 AM
-- Server version: 10.1.10-MariaDB
-- PHP Version: 7.0.2
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 utf8mb4 */;
--
-- Database: `wod`
--
CREATE DATABASE IF NOT EXISTS `wod` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
USE `wod`;
-- --------------------------------------------------------
--
-- Table structure for table `checksums`
--
DROP TABLE IF EXISTS `checksums`;
CREATE TABLE IF NOT EXISTS `checksums` (
`file` int(11) NOT NULL,
`size` int(11) NOT NULL,
`crc` varchar(8) NOT NULL,
`md5` varchar(32) NOT NULL,
`sha1` varchar(40) NOT NULL,
PRIMARY KEY (`file`,`size`,`crc`,`md5`,`sha1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `files`
--
DROP TABLE IF EXISTS `files`;
CREATE TABLE IF NOT EXISTS `files` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`setid` int(11) NOT NULL,
`name` varchar(30000) NOT NULL,
`type` varchar(10) NOT NULL DEFAULT 'rom',
`lastupdated` datetime NOT NULL DEFAULT '1970-01-01 00:00:00',
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`),
KEY `FK_games_files_Cascade` (`setid`)
) ENGINE=InnoDB AUTO_INCREMENT=42824 DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `games`
--
DROP TABLE IF EXISTS `games`;
CREATE TABLE IF NOT EXISTS `games` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`system` int(11) NOT NULL,
`name` varchar(30000) NOT NULL,
`parent` int(11) NOT NULL DEFAULT '0',
`source` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=22535 DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `parent`
--
DROP TABLE IF EXISTS `parent`;
CREATE TABLE IF NOT EXISTS `parent` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(1024) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `sources`
--
DROP TABLE IF EXISTS `sources`;
CREATE TABLE IF NOT EXISTS `sources` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(767) NOT NULL,
`url` longtext NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`),
UNIQUE KEY `name` (`name`),
KEY `name_2` (`name`),
KEY `name_3` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=208 DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `systems`
--
DROP TABLE IF EXISTS `systems`;
CREATE TABLE IF NOT EXISTS `systems` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`manufacturer` varchar(1024) NOT NULL,
`system` varchar(1024) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=431 DEFAULT CHARSET=latin1;
/*!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 */;

BIN
scripts/parent.7z Normal file

Binary file not shown.

BIN
scripts/sources.7z Normal file

Binary file not shown.

BIN
scripts/systems.7z Normal file

Binary file not shown.