From: root Date: Fri, 6 Oct 2017 07:53:03 +0000 (+0100) Subject: rename db.type by db_type X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=02269570dfe0e698ef7f37128d0b1241e68908ef;p=nb.git rename db.type by db_type --- 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); },