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

fix date time with timezone type introspection on Oracle

parent fcd13876
...@@ -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";
......
...@@ -242,6 +242,7 @@ class OracleSchemaManagerTest extends SchemaManagerFunctionalTestCase ...@@ -242,6 +242,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);
...@@ -249,5 +250,6 @@ class OracleSchemaManagerTest extends SchemaManagerFunctionalTestCase ...@@ -249,5 +250,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