Initial commit
This commit is contained in:
1268
api-wiaas/sandbox_scripts/database_structure/tables.txt
Normal file
1268
api-wiaas/sandbox_scripts/database_structure/tables.txt
Normal file
File diff suppressed because it is too large
Load Diff
31
api-wiaas/sandbox_scripts/get_database_structure.php
Normal file
31
api-wiaas/sandbox_scripts/get_database_structure.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
require_once('../config.php');
|
||||
require_once('../'.PATH_CORE.'ErrorHandler.php');
|
||||
require_once('../'.PATH_CORE.'Database.php');
|
||||
|
||||
$errorHandler = new ErrorHandler();
|
||||
$database = new Database(DB_SERVER, DB_USER, DB_PASS, DB_NAME);
|
||||
|
||||
$mes = '';
|
||||
$file = ROOT_DIR.'sandbox_scripts/database_structure/tables.txt';
|
||||
$sql ="SHOW TABLES";
|
||||
$query = $database->query($sql);
|
||||
while($row = $database->fetchArray($query)){
|
||||
$sqlTable = "DESCRIBE ".$row['Tables_in_ricoh_dash'];
|
||||
$queryTable = $database->query($sqlTable);
|
||||
|
||||
$mes .= $row['Tables_in_ricoh_dash'] . PHP_EOL;
|
||||
$mes .= '-------------------------------------------------------' . PHP_EOL;
|
||||
while ($tableCol = $database->fetchArray($queryTable)){
|
||||
foreach ($tableCol as $key => $value) {
|
||||
$mes .= $key . ' : ' . $value . PHP_EOL;
|
||||
}
|
||||
$mes .= PHP_EOL;
|
||||
}
|
||||
$mes .= '-------------------------------------------------------' . PHP_EOL;
|
||||
$mes .= PHP_EOL;
|
||||
}
|
||||
|
||||
file_put_contents($file, $mes);
|
||||
echo PHP_EOL . 'Database structure saved!' . PHP_EOL;
|
||||
?>
|
||||
2
api-wiaas/sandbox_scripts/updateOrdersEndOfLife.sh
Normal file
2
api-wiaas/sandbox_scripts/updateOrdersEndOfLife.sh
Normal file
@@ -0,0 +1,2 @@
|
||||
php ../index.php?apiKey=XX12345ZXC98765MNBV&module=orders&controller=api&action=updateOrdersEndOfLife
|
||||
|
||||
16
api-wiaas/sandbox_scripts/update_application_mode.php
Normal file
16
api-wiaas/sandbox_scripts/update_application_mode.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
$filePath = __DIR__.'/../config.php';
|
||||
|
||||
try {
|
||||
$file_content = file_get_contents($filePath);
|
||||
if($file_content){
|
||||
$file_content = str_replace("define('APPLICATION_MODE', 'DEV');", "define('APPLICATION_MODE', 'TEST');", $file_content);
|
||||
file_put_contents($filePath, $file_content);
|
||||
echo "Config file updated to TEST mdoe!";
|
||||
}else{
|
||||
echo "Unable to open config file!";
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
echo "Can not open file $filePath: " . $e;
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user