Commit 582c8428 authored by Steve Müller's avatar Steve Müller

fix date time with timezone type introspection on Oracle

parent a13c7d36
...@@ -102,7 +102,7 @@ class OracleSchemaManager extends AbstractSchemaManager ...@@ -102,7 +102,7 @@ class OracleSchemaManager extends AbstractSchemaManager
$dbType = strtolower($tableColumn['data_type']); $dbType = strtolower($tableColumn['data_type']);
if (strpos($dbType, "timestamp(") === 0) { if (strpos($dbType, "timestamp(") === 0) {
if (strpos($dbType, "WITH TIME ZONE")) { if (strpos($dbType, "with time zone")) {
$dbType = "timestamptz"; $dbType = "timestamptz";
} else { } else {
$dbType = "timestamp"; $dbType = "timestamp";
......
...@@ -240,6 +240,7 @@ class OracleSchemaManagerTest extends SchemaManagerFunctionalTestCase ...@@ -240,6 +240,7 @@ class OracleSchemaManagerTest extends SchemaManagerFunctionalTestCase
$table = new Table('tbl_date'); $table = new Table('tbl_date');
$table->addColumn('col_date', 'date'); $table->addColumn('col_date', 'date');
$table->addColumn('col_datetime', 'datetime'); $table->addColumn('col_datetime', 'datetime');
$table->addColumn('col_datetimetz', 'datetimetz');
$this->_sm->dropAndCreateTable($table); $this->_sm->dropAndCreateTable($table);
...@@ -247,5 +248,6 @@ class OracleSchemaManagerTest extends SchemaManagerFunctionalTestCase ...@@ -247,5 +248,6 @@ class OracleSchemaManagerTest extends SchemaManagerFunctionalTestCase
$this->assertSame('date', $columns['col_date']->getType()->getName()); $this->assertSame('date', $columns['col_date']->getType()->getName());
$this->assertSame('datetime', $columns['col_datetime']->getType()->getName()); $this->assertSame('datetime', $columns['col_datetime']->getType()->getName());
$this->assertSame('datetimetz', $columns['col_datetimetz']->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