From 7c652423bd15f6998ec569485b9de20b5bdc96a2 Mon Sep 17 00:00:00 2001 From: Hendri Triwanto Date: Thu, 6 May 2021 11:13:59 +0700 Subject: [PATCH] [fixed] MariaDB use current_timestamp() instead of CURRENT_TIMESTAMP --- Sqltoci.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sqltoci.php b/Sqltoci.php index 1b6fa03..851624e 100644 --- a/Sqltoci.php +++ b/Sqltoci.php @@ -260,7 +260,7 @@ function generate($tables = null) { } //si tiene DEAFAULT generar sql texto plano para escapar el strin en caso e.g. CURRENT_TIMESTAMP - if( $column_default == 'CURRENT_TIMESTAMP' ) + if( $column_default == 'CURRENT_TIMESTAMP' or $column_default == 'current_timestamp()') { $up .= PHP_EOL."\t\t\t"."'`$column[Field]` $column[Type] " . ($column['Null'] == 'NO' ? 'NOT NULL' : 'NULL') . (