From 02269570dfe0e698ef7f37128d0b1241e68908ef Mon Sep 17 00:00:00 2001 From: root Date: Fri, 6 Oct 2017 08:53:03 +0100 Subject: [PATCH] rename db.type by db_type --- lib/php/db/types/mysql.php | 1 + lib/php/db/types/sqlite.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/php/db/types/mysql.php b/lib/php/db/types/mysql.php index 7903cc60..16d1a8e2 100644 --- a/lib/php/db/types/mysql.php +++ b/lib/php/db/types/mysql.php @@ -101,6 +101,7 @@ $DB_TYPES['mysql'] = array ( 'table.sql.create' => function($sql,$t) { $sql = preg_replace('/ESCAPE \'.*?\'/','',$sql); $sql = preg_replace('/CHARSET=\S+\s*$/','CHARSET='.str_replace('-','',$t->db()->charset),$sql); + $sql = str_replace("date DEFAULT 'NULL'","date",$sql); return $sql; }, diff --git a/lib/php/db/types/sqlite.php b/lib/php/db/types/sqlite.php index ef77b85b..a47c31d5 100644 --- a/lib/php/db/types/sqlite.php +++ b/lib/php/db/types/sqlite.php @@ -117,7 +117,7 @@ $DB_TYPES['sqlite'] = array ( if (is_array($size)) $size = join(',',$size); $r = array( '/^(.*?) (unsigned)( .*?)?$/i' => '\2 \1\3', - '/enum\(.*?\)/i' => 'VARCHAR'.($size ? "($size)" : '') + '/enum\(.*?\)/i' => 'VARCHAR'.($size ? "($size)" : ''), ); $field->type = preg_replace(array_keys($r),array_values($r),$field->type); }, -- 2.47.3