Commit c6201fb5 by Carsten Brandt

fixed cubrid test case

parent e503a364
......@@ -117,6 +117,9 @@ class QueryBuilderTest extends DatabaseTestCase
public function testCreateTableColumnTypes()
{
$qb = $this->getQueryBuilder();
if ($qb->db->getTableSchema('column_type_table', true) !== null) {
$this->getConnection(false)->createCommand($qb->dropTable('column_type_table'))->execute();
}
$columns = [];
$i = 0;
foreach ($this->columnTypes() as $item) {
......@@ -126,7 +129,6 @@ class QueryBuilderTest extends DatabaseTestCase
}
}
$this->getConnection(false)->createCommand($qb->createTable('column_type_table', $columns))->execute();
$this->getConnection(false)->createCommand($qb->dropTable('column_type_table'))->execute();
}
public function conditionProvider()
......
......@@ -58,16 +58,16 @@ class CubridQueryBuilderTest extends QueryBuilderTest
[Schema::TYPE_DECIMAL . '(12,4) CHECK (value > 5.6)', 'decimal(12,4) CHECK (value > 5.6)'],
[Schema::TYPE_DECIMAL . ' NOT NULL', 'decimal(10,0) NOT NULL'],
[Schema::TYPE_DATETIME, 'datetime'],
[Schema::TYPE_DATETIME . " CHECK(value BETWEEN '2011-01-01' AND '2013-01-01')", "datetime CHECK(value BETWEEN '2011-01-01' AND '2013-01-01')"],
[Schema::TYPE_DATETIME . " CHECK (value BETWEEN '2011-01-01' AND '2013-01-01')", "datetime CHECK (value BETWEEN '2011-01-01' AND '2013-01-01')"],
[Schema::TYPE_DATETIME . ' NOT NULL', 'datetime NOT NULL'],
[Schema::TYPE_TIMESTAMP, 'timestamp'],
[Schema::TYPE_TIMESTAMP . " CHECK(value BETWEEN '2011-01-01' AND '2013-01-01')", "timestamp CHECK(value BETWEEN '2011-01-01' AND '2013-01-01')"],
[Schema::TYPE_TIMESTAMP . " CHECK (value BETWEEN '2011-01-01' AND '2013-01-01')", "timestamp CHECK (value BETWEEN '2011-01-01' AND '2013-01-01')"],
[Schema::TYPE_TIMESTAMP . ' NOT NULL', 'timestamp NOT NULL'],
[Schema::TYPE_TIME, 'time'],
[Schema::TYPE_TIME . " CHECK(value BETWEEN '12:00:00' AND '13:01:01')", "time CHECK(value BETWEEN '12:00:00' AND '13:01:01')"],
[Schema::TYPE_TIME . " CHECK (value BETWEEN '12:00:00' AND '13:01:01')", "time CHECK (value BETWEEN '12:00:00' AND '13:01:01')"],
[Schema::TYPE_TIME . ' NOT NULL', 'time NOT NULL'],
[Schema::TYPE_DATE, 'date'],
[Schema::TYPE_DATE . " CHECK(value BETWEEN '2011-01-01' AND '2013-01-01')", "date CHECK(value BETWEEN '2011-01-01' AND '2013-01-01')"],
[Schema::TYPE_DATE . " CHECK (value BETWEEN '2011-01-01' AND '2013-01-01')", "date CHECK (value BETWEEN '2011-01-01' AND '2013-01-01')"],
[Schema::TYPE_DATE . ' NOT NULL', 'date NOT NULL'],
[Schema::TYPE_BINARY, 'blob'],
[Schema::TYPE_BOOLEAN, 'smallint'],
......
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