Commit fcd13876 authored by Steve Müller's avatar Steve Müller Committed by Marco Pivetta

fixes #2555: fix date type mapping on Oracle

parent 94016b98
...@@ -1123,7 +1123,7 @@ LEFT JOIN user_cons_columns r_cols ...@@ -1123,7 +1123,7 @@ LEFT JOIN user_cons_columns r_cols
'nvarchar2' => 'string', 'nvarchar2' => 'string',
'char' => 'string', 'char' => 'string',
'nchar' => 'string', 'nchar' => 'string',
'date' => 'datetime', 'date' => 'date',
'timestamp' => 'datetime', 'timestamp' => 'datetime',
'timestamptz' => 'datetimetz', 'timestamptz' => 'datetimetz',
'float' => 'float', 'float' => 'float',
......
...@@ -233,4 +233,21 @@ class OracleSchemaManagerTest extends SchemaManagerFunctionalTestCase ...@@ -233,4 +233,21 @@ class OracleSchemaManagerTest extends SchemaManagerFunctionalTestCase
$columns = $this->_sm->listTableColumns($table->getName(), $this->_conn->getUsername()); $columns = $this->_sm->listTableColumns($table->getName(), $this->_conn->getUsername());
$this->assertCount(7, $columns); $this->assertCount(7, $columns);
} }
/**
* @group DBAL-2555
*/
public function testListTableDateTypeColumns()
{
$table = new Table('tbl_date');
$table->addColumn('col_date', 'date');
$table->addColumn('col_datetime', 'datetime');
$this->_sm->dropAndCreateTable($table);
$columns = $this->_sm->listTableColumns('tbl_date');
$this->assertSame('date', $columns['col_date']->getType()->getName());
$this->assertSame('datetime', $columns['col_datetime']->getType()->getName());
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment