src/Database/Migration/Schema/Grammar.php
/**
	 * Compiles a default value into a string that can be inserted directly into an SQL query without any further
	 * escaping. Returns false for invalid values.
	 *
	 * @param mixed $value
	 * @return string|false
	 */
Compiles a default value into a string that can be inserted directly into an SQL query without any further
escaping. Returns false for invalid values.

@param mixed $value
@return string|false
Compiles a default value into a string that can be inserted directly into an SQL query without any further escaping . Returns false for invalid values . @param mixed $value @return string|false
public static function compileDefault($value) {
		if (is_null($value)) {
			return 'NULL';
		}
		if (is_bool($value)) {
			return $value ? 'TRUE' : 'FALSE';
		}
		if (is_numeric($value)) {
			return "'{$value}'";
		}
		if (is_string($value)) {
			if ($value === 'CURRENT_TIMESTAMP') {
				return $value;
			}
			$value = str_replace(chr(39), chr(92) . chr(39), $value);
			return "'{$value}'";
		}
		return false;
	}
public static function compileDefault ( $ value ) { if ( is_null ( $ value ) ) { return 'NULL' ; } if ( is_bool ( $ value ) ) { return $ value ? 'TRUE' : 'FALSE' ; } if ( is_numeric ( $ value ) ) { return " ' { $ value } ' " ; } if ( is_string ( $ value ) ) { if ( $ value === 'CURRENT_TIMESTAMP' ) { return $ value ; } $ value = str_replace ( chr ( 39 ) , chr ( 92 ) . chr ( 39 ) , $ value ) ; return " ' { $ value } ' " ; } return false ; }
Compiles a default value into a string that can be inserted directly into an SQL query without any further
 escaping.
Compiles a default value into a string that can be inserted directly into an SQL query without any further escaping .