mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-03 16:51:40 +09:00
Allow escaping column type with a backslash to use literal DB type, e.g. date
DB에서 지원하는 타입명과 XE 호환성을 위해 유지하는 타입명이 충돌하는 경우 (예: date) XML 스키마에서 타입명 앞에 백슬래시를 붙이면 (예: \date) DB에서 지원하는 타입명을 강제로 사용할 수 있도록 함.
This commit is contained in:
parent
265a23f5ce
commit
7f2504b9b7
3 changed files with 8 additions and 1 deletions
|
|
@ -218,7 +218,8 @@ class DBTableParser extends BaseParser
|
|||
}
|
||||
else
|
||||
{
|
||||
$xetype = $type;
|
||||
$xetype = 'none';
|
||||
$type = ltrim($type, '\\');
|
||||
}
|
||||
|
||||
// Extract and normalize the size.
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@
|
|||
<column name="description" type="bigtext" />
|
||||
<column name="geometry" type="multipolygon" />
|
||||
<column name="status" type="varchar" size="20" default="PUBLIC" />
|
||||
<column name="custom_date" type="\date" notnull="notnull" />
|
||||
<column name="regdate" type="date" notnull="notnull" />
|
||||
<column name="list_order" type="number" notnull="notnull" />
|
||||
<index name="idx_module_document_srl" columns="module_srl,document_srl" />
|
||||
<index name="idx_status" columns="status(6)" />
|
||||
|
|
|
|||
|
|
@ -18,6 +18,10 @@ class DBTableParserTest extends \Codeception\TestCase\Test
|
|||
$this->assertTrue($table->columns['module_srl']->is_indexed);
|
||||
$this->assertTrue($table->columns['list_order']->is_unique);
|
||||
$this->assertFalse($table->columns['geometry']->is_unique);
|
||||
$this->assertEquals('date', $table->columns['custom_date']->type);
|
||||
$this->assertEquals('none', $table->columns['custom_date']->xetype);
|
||||
$this->assertEquals('char', $table->columns['regdate']->type);
|
||||
$this->assertEquals('date', $table->columns['regdate']->xetype);
|
||||
|
||||
$this->assertEquals(8, count($table->indexes));
|
||||
$this->assertEquals(['module_srl' => 0, 'document_srl' => 0], $table->indexes['idx_module_document_srl']->columns);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue