]> git.nbdom.net Git - nb.git/commitdiff
rename db.type by db_type
authorroot <sys@15gifts.com>
Fri, 6 Oct 2017 07:53:03 +0000 (08:53 +0100)
committerroot <sys@15gifts.com>
Fri, 6 Oct 2017 07:53:03 +0000 (08:53 +0100)
lib/php/db/types/mysql.php
lib/php/db/types/sqlite.php

index 7903cc6061f574f461f97b8e6f5324c8e703e091..16d1a8e2bbd2b769594a5439ca4535fc6caabf31 100644 (file)
@@ -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;
 },
 
index ef77b85b3dc81dbd878a631eb89a8691401ef09d..a47c31d52615f6a8271bef5bd87f3dd8ba35a658 100644 (file)
@@ -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);
 },