src/Query/Dialects/MySQL/CreateTable.php 1 location
|
@@ 102-104 (lines=3) @@
|
99 |
|
case $type === 'TIMESTAMP' && intval($defaultValue) === 0: |
100 |
|
$field[] = 'DEFAULT 0'; |
101 |
|
break; |
102 |
|
case $type === 'BIT': |
103 |
|
$field[] = 'DEFAULT b\''.preg_replace('/[^01]/', '0', $defaultValue).'\''; |
104 |
|
break; |
105 |
|
case $type === 'BOOLEAN': |
106 |
|
$field[] = 'DEFAULT '.preg_match('/^1|T|TRUE|YES$/i', $defaultValue) ? 'TRUE' : 'FALSE'; |
107 |
|
break; |
src/Query/Dialects/Postgres/CreateTable.php 1 location
|
@@ 115-117 (lines=3) @@
|
112 |
|
case $type === 'TIMESTAMP' && intval($defaultValue) === 0: |
113 |
|
$field[] = 'DEFAULT 0'; |
114 |
|
break; |
115 |
|
case $type === 'BIT' || $type === 'VARBIT': |
116 |
|
$field[] = 'DEFAULT b\''.preg_replace('/[^01]/', '0', $defaultValue).'\''; |
117 |
|
break; |
118 |
|
case $type === 'BOOLEAN': |
119 |
|
$field[] = 'DEFAULT '.preg_match('/^1|T|TRUE|YES$/i', $defaultValue) ? 'TRUE' : 'FALSE'; |
120 |
|
break; |