Commit 44045a6b authored by romanb's avatar romanb

[2.0][DDC-88] Quoted field name in decimal model as a little test for identifier quoting.

parent e2962c73
......@@ -14,7 +14,7 @@ class DecimalModel
*/
public $id;
/**
* @Column(type="decimal", scale=2, precision=5)
* @Column(name="`decimal`", type="decimal", scale=5, precision=2)
*/
public $decimal;
}
\ No newline at end of file
......@@ -47,7 +47,7 @@ class MySqlSchemaToolTest extends \Doctrine\Tests\OrmFunctionalTestCase
$sql = $tool->getCreateSchemaSql($classes);
$this->assertEquals(1, count($sql));
$this->assertEquals("CREATE TABLE decimal_model (id INT AUTO_INCREMENT NOT NULL, decimal NUMERIC(5, 2) NOT NULL, PRIMARY KEY(id)) ENGINE = InnoDB", $sql[0]);
$this->assertEquals("CREATE TABLE decimal_model (id INT AUTO_INCREMENT NOT NULL, `decimal` NUMERIC(2, 5) NOT NULL, PRIMARY KEY(id)) ENGINE = InnoDB", $sql[0]);
}
public function testGetCreateSchemaSql3()
......
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