mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 00:01:21 +00:00
added a couple scripts for sql
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
require(dirname(__FILE__)."/../bin/config.php");
|
||||
require(WWW_DIR."/lib/framework/cache.php");
|
||||
require_once(WWW_DIR."/lib/framework/db.php");
|
||||
|
||||
$sql = "SHOW tables";
|
||||
$db = new DB();
|
||||
|
||||
$tables = $db->query($sql);
|
||||
foreach($tables as $row)
|
||||
{
|
||||
$tbl = $row['Tables_in_newznab'];
|
||||
printf("Converting $tbl\n");
|
||||
$sql = "ALTER TABLE $tbl ENGINE=INNODB ROW_FORMAT=DYNAMIC";
|
||||
$db->query($sql);
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
require(dirname(__FILE__)."/../bin/config.php");
|
||||
require_once(WWW_DIR."/lib/framework/db.php");
|
||||
|
||||
$db = new DB;
|
||||
|
||||
$rel = $db->query("truncate table parts");
|
||||
$rel = $db->query("truncate table partsrepair");
|
||||
$rel = $db->query("truncate table binaries;");
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user