1
0
www.mikescher.com/DB_Changes.txt

53 lines
1.6 KiB
Plaintext
Raw Normal View History

2014-05-28 17:19:57 +02:00
othervalues -> Added Column SValue
othervalues -> Added Key "AdminPassword"
2014-06-08 15:32:00 +02:00
othervalues -> Added Keys "egg_*"
2014-05-28 17:19:57 +02:00
programme -> Added Column ThumbnailName
programme -> Added Column programming_lang
2014-06-02 19:31:14 +02:00
programme -> Changed Sieb_des_Erasthothenes -> Sieb des Erasthothenes (also ren Imagefiles)
programme -> Adjusted Star Ratings
2014-06-04 18:06:38 +02:00
programme -> Niripsa[visible] = 0
programme -> ms4_programs
2014-06-12 14:36:34 +02:00
programme -> Removed Column viewable_code
programme -> update_identifier is no VARCHAR(64)
idx_info -> ms4_log
2014-06-06 19:31:05 +02:00
idx_info -> new columns + full content change
2014-06-12 14:36:34 +02:00
othervalues -> ms4_othervalues
updates -> ms4_updates
updates -> 'Name' is primary key
updates -> Adjust 'Link'
updates -> 'Name' Type is VARCHAR(64)
updates -> Removed col 'Log'
2014-07-11 19:29:19 +02:00
ms4_log -> Added
updateslog -> new table
<?php
$rows=Yii::app()->db->createCommand('SELECT * FROM {{updates}}')->queryAll();
$transaction=Yii::app()->db->beginTransaction();
foreach($rows as $row) {
$prog = $row['Name'];
$log = $row['Log'];
$lines = explode('<br>', $log);
foreach ($lines as $line) {
$result = array();
preg_match('/([^ ]+)[^0-9]*([0-9\.]+)[^\(]*\((.*?)\)/', $line, $result);
if (count($result) == 4) {
$ip = trim($result[1]);
$version = trim($result[2]);
$date = DateTime::createFromFormat('d.m.Y - H:i:s', trim($result[3]));
echo $prog . ' | ' . $ip . ' | ' . $version . ' | ' . $date->format('Y-m-d H:i:s') . '<br>';
Yii::app()->db->createCommand("INSERT INTO {{updateslog}} (programname, ip, version, date) VALUES ('$prog', '$ip', '$version', '" . $date->format('Y-m-d H:i:s') . "')")->execute();
}
}
echo '<hr>';
}
$transaction->commit();
?>