mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-17 06:48:59 +08:00
MSSQL AR tests.
This commit is contained in:
@@ -290,13 +290,6 @@ SQL;
|
||||
$table->primaryKey = $this->db
|
||||
->createCommand($sql, array(':tableName' => $table->name, ':schemaName' => $table->schemaName))
|
||||
->queryColumn();
|
||||
if (count($table->primaryKey) == 0) {
|
||||
// table does not have primary key
|
||||
$table->primaryKey = null;
|
||||
} elseif (count($table->primaryKey) == 1) {
|
||||
// table has one primary key
|
||||
$table->primaryKey = $table->primaryKey[0];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
12
tests/unit/framework/db/mssql/MssqlActiveRecordTest.php
Normal file
12
tests/unit/framework/db/mssql/MssqlActiveRecordTest.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace yiiunit\framework\db\mssql;
|
||||
|
||||
class MssqlActiveRecordTest extends \yiiunit\framework\db\ActiveRecordTest
|
||||
{
|
||||
protected function setUp()
|
||||
{
|
||||
$this->driverName = 'sqlsrv';
|
||||
parent::setUp();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user