facturation/upgrade.php
2020-03-22 06:32:48 +01:00

13 lines
360 B
PHP

<?php
namespace Garradin;
$db = DB::getInstance();
$db->import(dirname(__FILE__) . "/data/schema.sql");
$r = (array) DB::getInstance()->get('SELECT * FROM plugin_facturation_factures');
foreach ($r as $e) {
$e->contenu =json_encode(unserialize((string) $e->contenu));
$db->update('plugin_facturation_factures', $e, $db->where('id', (int)$e->id));
}