mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 17:21:39 +09:00
Fix #2169 allow simple expressions as default values for table columns
This commit is contained in:
parent
06e736178b
commit
3fbb1327d2
1 changed files with 4 additions and 0 deletions
|
|
@ -63,6 +63,10 @@ class Table
|
|||
{
|
||||
$columndef .= ' DEFAULT ' . $column->default_value;
|
||||
}
|
||||
elseif (preg_match('/^[a-z0-9_()]$/i', $column->default_value))
|
||||
{
|
||||
$columndef .= ' DEFAULT ' . $column->default_value;
|
||||
}
|
||||
else
|
||||
{
|
||||
$columndef .= ' DEFAULT \'' . $column->default_value . '\'';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue