src/Query/Dialects/Postgres/CreateTable.php 1 location
|
@@ 132-134 (lines=3) @@
|
129 |
|
case $type === 'TIMESTAMP' && intval($defaultValue) === 0: |
130 |
|
$field[] = 'DEFAULT 0'; |
131 |
|
break; |
132 |
|
case $type === 'BIT' || $type === 'VARBIT': |
133 |
|
$field[] = 'DEFAULT b\''.preg_replace('/[^01]/', '0', $defaultValue).'\''; |
134 |
|
break; |
135 |
|
case $type === 'BOOLEAN': |
136 |
|
$field[] = 'DEFAULT '.preg_match('/^1|T|TRUE|YES$/i', $defaultValue) ? 'TRUE' : 'FALSE'; |
137 |
|
break; |
src/Query/Dialects/MySQL/CreateTable.php 1 location
|
@@ 127-129 (lines=3) @@
|
124 |
|
case $type === 'TIMESTAMP' && intval($defaultValue) === 0: |
125 |
|
$field[] = 'DEFAULT 0'; |
126 |
|
break; |
127 |
|
case $type === 'BIT': |
128 |
|
$field[] = 'DEFAULT b\''.preg_replace('/[^01]/', '0', $defaultValue).'\''; |
129 |
|
break; |
130 |
|
case $type === 'BOOLEAN': |
131 |
|
$field[] = 'DEFAULT '.preg_match('/^1|T|TRUE|YES$/i', $defaultValue) ? 'TRUE' : 'FALSE'; |
132 |
|
break; |