mirror of
https://github.com/devcode-it/openstamanager.git
synced 2024-12-18 11:19:17 +01:00
Correzione minore su namespace in aggiornamento
This commit is contained in:
parent
f4c0909425
commit
542f3035a2
@ -4,6 +4,8 @@
|
||||
* Creazione dei campi per l'API (created_at e updated_at)
|
||||
*/
|
||||
|
||||
use API\Response;
|
||||
|
||||
// I record precedenti vengono impostati a NULL
|
||||
$tables = include __DIR__.'/tables.php';
|
||||
|
||||
@ -16,7 +18,7 @@ foreach ($tables as $table) {
|
||||
$database->query('ALTER TABLE `'.$table.'` ADD `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP');
|
||||
}
|
||||
|
||||
if (API\Response::isCompatible()) {
|
||||
if (Response::isCompatible()) {
|
||||
$updated_at = $database->fetchArray(str_replace('|field|', 'updated_at', $query));
|
||||
if (empty($updated_at)) {
|
||||
$database->query('ALTER TABLE `'.$table.'` ADD `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP');
|
||||
|
Loading…
Reference in New Issue
Block a user